0

I have links in a dropdown menu bar for navigation around my site. Yesterday, they worked fine. Today, they the menus no longer dropdown and the links that do display (in the headers) don't function like links (i.e. cursor doesn't change, they don't display the hover color change, etc.) I even reverted to old commits to make sure I hadn't broken them, but they don't work at all, even for commits where I am 100% positive they used to. When I do click on a 'link', I get the warning 'event.returnValue is deprecated. Please use the standard event.preventDefault() instead.' from a jQuery file. I've tested on both Chrome and Firefox. Normal links work fine, just not the ones in my navigation bar.

<ul>
  <li><a href="#">About Us</a>
      <ul>
         <li><a href="/quiz/" >Quiz</a></li>
         <li><a href="/photos/">Photos</a></li>
         <li><a href="/story/" class="last">Our Story</a></li>
      </ul>
  </li>
</ul>

Edit: That warning actually comes up whenever I click anywhere on the screen, not just on the links.

Edit: http://jsfiddle.net/sLNHz/

thumbtackthief
  • 6,093
  • 10
  • 41
  • 87

1 Answers1

2

In your fiddle, it's the display: inline on the <ul> element: That makes the whole thing collapsing to zero width and hence the links unclickable. The text is shown because of the default overflow: visible. So, it's a CSS issue, not a JS one.

Boldewyn
  • 81,211
  • 44
  • 156
  • 212
  • Wow. You are correct. Do you have any idea why that used to work and now doesn't? I can guarantee I haven't changed it--that line's been there a very long time. – thumbtackthief Nov 18 '13 at 17:54
  • When did you comment out the `float:left` on the `ul`? Floating changes the effective `display` (not the value set, but what the browser does with the element) to `block`. Basically, the issue arises, because someone changed from a float-based horizontal nav to a `display:inline`-based or vice versa and left half of the old statements in there. My suggestion: clear either the `inline` or the `float` declarations. – Boldewyn Nov 19 '13 at 12:36