jquery - foucusout not working on FF or IE but works on chrome -
foucusout working on chrome not ff or ie. have built basic dropdown menu opens on click, closes on focusout. when click on link on 2nd level 'ul' dropdown closes doesn't go requested page. *the second level navigation opens on hover of 1st level nav see code below.
thanks
js
// main drop down navigation resources.on('click', 'a.dropdown', function (e) { e.preventdefault(); var menu; select = $(this); menu = select.closest('ul'); menu.focus().addclass('open'); }).on('focusout', 'ul.menu', function (e) { select = $(this); select.removeclass('open'); });
html
<div class="custom-dropdown"> <ul class="menu level0" tabindex="-1"> <li><a class="dropdown" href="#">please select database</a> <ul class="level1" tabindex="-1"> <li><span>cancer</span> <ul class="level2" tabindex="-1"> <li><a class="noaccess" href="http://www.google.com">cancer e-atlas</a></li> <li><a href="http://www.google.com">cancer mortality profile</a></li> <li><a href="http://www.google.com">cancer patient experience</a></li> <li><a href="http://www.google.com">cervical screening cancer e-atlas</a></li> <li><a href="http://www.google.com">gp pratice profiles</a></li> <li><a href="#">gynaecological cancer hub</a></li> <li><a href="#">gynaecological cancer profiles</a></li> <li><a href="#">head , neck cancer e-atlas</a></li> <li><a href="#">national radiotherapy profiles</a></li> <li><a href="#">pct profiles</a></li> <li><a href="#">prevalence e-atlas</a></li> <li><a href="#">profile of head , neck cancers in england</a></li> <li><a href="#">service profiles</a></li> <li><a href="#">skin cancer profiles</a></li> <li><a href="#">systemic anti-cancer therapy (chemotherapy)</a></li> <li><a href="#">thirty-day postoperative mortality after colorectal</a></li> <li><a href="#">understanding cancer e-learning</a></li> <li><a class="locked" href="#">urological cancer hub</a></li> <li><a class="locked" href="#">urological cancer profiles</a></li> </ul> </li> <li><span>comparison pratice , performance</span></li> <li><span>drugs , alcohol</span></li> <li><span>health inequalities</span></li> <li><span>health needs</span></li> <li><span>health profiles</span></li> <li><span>hospital episodes , admissions</span></li> <li><span>infectious , communicable disease</span></li> <li><span>injuries , violence</span></li> <li><span>learning disabilities</span></li> <li><span>lifestyle, diet , exercise</span></li> <li><span>long term conditions</span></li> <li><span>mental health</span></li> <li><span>other</span></li> <li><span>screening</span></li> <li><span>sexual health</span></li> <li><span>smoking</span></li> <li><span>social care, adults , older people</span></li> </ul> </li> </ul> </div>
Comments
Post a Comment