JQuery Toggle Dropdown Menu
How could I write a section of jQuery so that when Trials is clicked that it will show the dropdown menu options: Update: jQuery(document).ready(function () { $('a[href='http:
Solution 1:
Take a look at this piece of code: http://jsfiddle.net/G9kda/6/ Click 'deelnemers' for the desired effect.
EDIT: I adjusted it to your code: http://jsfiddle.net/hXNnD/1/
Solution 2:
You could use something like this (Only for Trials)
$("a[href='http://sheep.local/cms/trials']").click(function(e){
e.preventDefault(); // In case you don't want the link to open...
$(this).nextAll('ul').slideToggle();
});
Post a Comment for "JQuery Toggle Dropdown Menu"