Skip navigation
Price sort by:
Itemsperpage:
9
9
18
36
◀12345▷
//MAYBETHISSHOULDNOTBEINASINGLEFUNCTIONMAYBETHEOPENDROPDOWNFUNCTIONWILLSETTHEVARIABLESANDTHENTHEOTHERFUNCTIONSAREOUTSIDE??
functionkilldropdownmenuname,containername{
varkillOuter=documentgetElementByIdcontainername;
varkillMenu=documentgetElementByIdmenuname;
killMenuclassListremove'dolon';
killOuterclassListremove'doborder';
}
functionopendropdownmenuname,containername{
varkillOuter=documentgetElementsByClassName'doborder'[0];
varkillMenu=documentgetElementsByClassName'dolon'[0];
ifkillMenu{
killMenuclassListremove'dolon';
}
ifkillOuter{
killOuterclassListremove'doborder';
}
vardropOuter=documentgetElementByIdcontainername;
vardropMenu=documentgetElementByIdmenuname;
dropMenuclassListadd'dolon';
dropOuterclassListadd'doborder';
dropMenuaddEventListener'mouseleave',function{
dropMenuclassListremove'dolon';
dropOuterclassListremove'doborder';
},false;
}
windowaddEventListener'keydown',functionevent{
varx=eventwhich||eventkeyCode;
ifx==27{
documentgetElementById'sortbymenu'classListremove'dolon';
documentgetElementById'sortbydisplayoptions'classListremove'doborder';
}
},false;