http://thetranslte.com/ tell me why the menu of the city when choosing does not throw the link? Nothing happens. Did on jquery.

<script type="text/javascript"> $("#dropdown").on("click", function(e){ e.preventDefault(); if($(this).hasClass("open")) { $(this).removeClass("open"); $(this).children("ul").slideUp("fast"); } else { $(this).addClass("open"); $(this).children("ul").slideDown("fast"); } }); </script> 
  • one
    what did you do on jquery? we would see the code - Oleksandr
  • <script type = "text / javascript"> $ ("# dropdown"). on ("click", function (e) {e.preventDefault (); if ($ (this) .hasClass ("open")) { $ (this) .removeClass ("open"); $ (this) .children ("ul"). slideUp ("fast");} else {$ (this) .addClass ("open"); $ (this) .children ("ul"). slideDown ("fast");}}); </ script> - The Os
  • Here is all the jquery code - The Os

2 answers 2

There is a high probability that links do not work because of e.preventDefault (); Try without it.

    Not seeing HTML is difficult to judge, but it seems that the problem is in e.preventDefault() - this method prevents the execution of an action (click in this case) for the entire #dropdown element, including children (including links in the drop-down menu).