Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Apr 2013
    Posts
    136
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question JQuery on hover change CSS

    on my site here: http://www.cafinancialservices.co.uk/
    I have some children pages linked under parent links

    I would like to show the sub navigation of that particular parent when hovered over the parent

    by default they are set to display:none; here is my code that at the moment doesn't work and I'm not sure why?!

    Code:
    <script>
    $( document ).ready(function() {
    $("ul#qm0 .children", this).css("display","none");
    
    
    $('ul#qm0 .page_item_has_children', this)
    .hover(function() {
        $("ul#qm0 .children", this).css("display","block");
    })
    });
    </script>
    Please help?

  • #2
    Regular Coder
    Join Date
    Apr 2013
    Posts
    136
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Can anyone help me here please?

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,092
    Thanks
    23
    Thanked 594 Times in 593 Posts
    I looked at your site yesterday. Some thing is hiding your second level menu items. Didn't spend long looking for it.
    Why? Because javascript is really not the way to do menus. Well that's just my opinion. Read this and see if you agree: Son of Suckerfish Dropdowns.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #4
    Regular Coder
    Join Date
    Apr 2013
    Posts
    136
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank you very much!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •