javascript - How to hook into MMenu event? -
i've added search facility mmenu jquery plugin. it's working great except 1 thing: when search textbox appears, want set focus it. far i've accomplished adding 'onmouseover' event handler parent of textbox 'ul' representing "page" visibly. kind of works kludgy because user needs move cursor on designated area. on mobile device, doubt work @ all
i'm looking way hook mmenu's event handler opens page search textbox on. here's example of html code i'm dealing with:
<nav id="menu" class="mm-menu mm-horizontal mm-offcanvas mm-current mm-opened"> <ul id="mm-0" class="mm-list mm-panel mm-opened mm-subopened"> <ul id="mm-1" class="mm-list mm-panel mm-highest mm-current mm-opened"> <li class="mm-subtitle"> search for: <input id="search" type="text" onkeyup="handlesearchinput(this);" size="20"> <br> <div id="searchresults" style="margin:10px 10px 0 20px"> </ul> <ul id="mm-2" class="mm-list mm-panel mm-hidden"> <ul id="mm-3" class="mm-list mm-panel mm-hidden"> <ul id="mm-4" class="mm-list mm-panel mm-hidden"> <ul id="mm-5" class="mm-list mm-panel mm-hidden"> <ul id="mm-6" class="mm-list mm-panel mm-hidden"> <ul id="mm-7" class="mm-list mm-panel mm-hidden"> <ul id="mm-8" class="mm-list mm-panel mm-hidden"> <ul id="mm-9" class="mm-list mm-panel mm-hidden"> <ul id="mm-10" class="mm-list mm-panel mm-hidden"> <ul id="mm-11" class="mm-list mm-panel mm-hidden"> <ul id="mm-12" class="mm-list mm-panel mm-hidden"> <ul id="mm-13" class="mm-list mm-panel mm-hidden"> <ul id="mm-14" class="mm-list mm-panel mm-hidden"> </nav>
might know how this?
robert w.
Comments
Post a Comment