I'm having trouble having Jquery add a class to a piece of code. I've
tried adding the class via "addClass" method, and I've also tried
chaining it in to the current  Jquery code for mouseenter and
mouseleave, but neither is working.

Here's the Jquery section of the javascript:

                         $(document).ready(function(){
                         $("li.main-nav").bind("mouseenter mouseleave", 
function(){
                                $(this).children('div').toggle();
                                        $('li.main-nav').addClass('menu-on');
                                return false;
                                });
                         });

See full code here:

http://dl.getdropbox.com/u/21984/navigation.html

Anybody have any ideas on what I'm doing wrong?

Reply via email to