try (function ($) { $(document).ready(function() { $("#second-column").on("swipe",function(){ if($(window).width()<=900) $("#nice-menu-1>li>ul").css("display: block; visibility: visible;"); }); }); })(jQuery);