kenny kenny - 7 months ago 33
CSS Question

slideToggle has a rubber band effect on my ul slideToggle (jQuery help)

My mobile menu has a jquery function of slideToggle when the window browser is smaller than

x. However, when the icon is clicked it slides down the
, but immediately slides it back up.

Here's what I'm talking about


Just comment or delete this line:

$(this).toggleClass('.trigger-expand').css('display', '');

Now if you want to change some css when the browser size is changing and is larger than 600px use this method:

$(window).on('resize', function(){
      var win = $(this); //this = window
      if (win.width() > 600) { 
         /* The window is larger than 600px 
            change you css style here */