hi folks i've found a few answers on this but can't seem to get any of them working . i've got a typical responsive nav that changes to a menu icon below a certain viewport width . i have the anchor tags in the dropdown menu close the menu when clicked as they are executing a scroll to function. however this is not useful when above a certain width . here's my code . i think this may be the way to go but suspect that my syntax is incorrect
<script> if($(window).width() <= 900){ $(document).ready(function(){ $(".trigger , .close").click(function(){ $(".showing ").slideToggle("slow"); }); }); </script>