0

JScript

    // Wait for the page and all the DOM to be fully loaded
    $('body').ready(function() {

   // Add the 'hover' event listener to our drop down class
   $('.dropdown').hover(function() {
    // When the event is triggered, grab the current element 'this' and 
    if ($(this).find('.sub_navigation').is(":visible")) {
        // find it's children '.sub_navigation' and display/hide them
        $(this).find('.sub_navigation').slideUp();
    } else {
        $(this).find('.sub_navigation').slideDown();

    }

    });
    });​        

First of all here is the fiddle //

http://jsfiddle.net/Hv2HZ/

I am using wordpress to create my site... (if that matters) Someone helped me get the drop-down menu to work better. But ever since I added the new JQuery script the link doesn't even work. I tried hovering over it but no menu dropped.

When I hover on the fiddle it works. Why is this? And how can I fix this?! :(

KXXT
  • 251
  • 2
  • 4
  • 20
  • You have unrelated (I think) Javascript errors, so no Javascript will work. Use Chrome and open up the Javascript console. It will show you if you have errors. This should always be a first check to identify the problem. – C. E. Oct 20 '12 at 10:43
  • It seems to be a question mark at the end of the piece of code quoted above. – C. E. Oct 20 '12 at 10:44
  • I deleted the question mark but it still doesn't work... – KXXT Oct 20 '12 at 10:46
  • Like I said, use a tool such as the one in Chrome or Firebug. You have another error at line 56. Using such a tool you would also see that the file print.css is missing on line 11 (unrelated to Javascript, though.) – C. E. Oct 20 '12 at 10:48
  • 1
    Ended up adding the script that created an error and everything works perfectly. Thanks for the help! – KXXT Oct 20 '12 at 11:13

0 Answers0