iamphill / Bootstrap-Offcanvas

:zap: Offcanvas menu built with Bootstrap
MIT License
366 stars 111 forks source link

Icon state at the time of window resizing #49

Closed minazou67 closed 8 years ago

minazou67 commented 8 years ago

Thanks for the awesome plugin!

An icon state when I resized a window is not right.

Now it works correctly with this JavaScript code.

$(window).on('resize', function() {
  return $('.navbar-offcanvas.in').each(function() {
    $(this).parent().find('.offcanvas-toggle').removeClass('is-open');
    return $(this).height('').removeClass('in');
  });
});

Thanks!