Hi I am trying to figure out why the jquery script stopped working for the responsive menu view for mobile devices: @media screen and ( max-width: 768px) Basically, selecting a menu item in the drop down list when in mobile device view, is not doing anything: http://hushmagazine.ca/
With my limited knowledge of jquery, I figured out that this code calls the selection of the menu item:
<select name="nav_menu_select" id="nav_menu_select"> <?php foreach($menu_array as $key=>$menu) : ?> <?php $selcted = ($key == $url)?'selected':''; ?> <option value="<?php echo $key; ?>" <?php echo $selcted; ?>><?php echo $menu; ?></option> <?php endforeach; ?> </select>
And then in the custom.js, this is what is called for that class:
$('#nav_menu_select').change(function () { window.location.href = this.value; });
Based on another stackoverflow thread, I tried this, but it didn't work.
$(document.body).on('change','#nav_menu_select',function(){ window.location.href = this.value; });
Any other suggestions or at least pointers? I am aware that there are many other jquery issues with this site, so I hope I tracked the problem. Thanks!