Mladen Bogomirov Mladen Bogomirov - 1 year ago 114
CSS Question

jQuery click() is not working

I am trying to make a dropdown from a tut a recently saw. It was designed to work with

but I want it on click event. When I change it like that it is not working anymore.

Here is it on JSFiddle:

P.S. Don't mind the irresponsiveness. I'll tidy up. :)

Answer Source

Hover could take two parameters while click could only take one.


$( ".a" ).hover(hoverIn(), hoverOut());


$( ".a" ).click(whatHappensWhenYouClick());

This should show the dropdown menu but it won't pull it up, try using toggleClass() to toggle between the dropdown and pull up state.

$(document).ready(function() {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download