javascript - jquery script won't run -
i have jquery function toggles div on click doesn't work can't tell if maybe imported library incorrectly or can't function @ all. please tell me if missing or messed code somewhere.
my exact code looks this:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("a.notifications-dropdown-trigger").click(function () { $('#post-notifications-dropdown').toggle('slide', { duration: 100, direction: 'up' }); }); }); </script>
the html markup:
<a class="notifications-dropdown-trigger">click me</a> <div id="post-notifications-dropdown"> .... code </div>
everything coded directly onto servers , live moment save.
you can use .slidetoggle()
description: display or hide matched elements sliding motion.
code
$(document).ready(function(){ $("a.notifications-dropdown-trigger").click(function (event) { $('#post-notifications-dropdown').slidetoggle(100); event.preventdefault(); }); });
Comments
Post a Comment