Reputation: 1
I got a div that is floated right and onClick, I would like to display another DIV containing a list of items that can be clicked on which could also be assigned by id, their own click events. Like a drop down menu for example.
How could I accomplish this?
Upvotes: 1
Views: 1004
Reputation: 6656
$("#diva ul li").click(function(){
$(this).find('#div').slideToggle();
});
Upvotes: 0
Reputation: 20431
This looks promising: http://css-tricks.com/simple-jquery-dropdowns/
Upvotes: 1
Reputation: 268414
If I understand you correctly, you want to show one div when you click another?
$("#diva").on("click", function(){
$("#divb").toggle();
});
Example: http://jsbin.com/uxaxap/edit#javascript,html
Upvotes: 1