jquery.fixer.js icon indicating copy to clipboard operation
jquery.fixer.js copied to clipboard

Unfixed Method

Open jeremie-baboukhian opened this issue 11 years ago • 3 comments

Hi, Thanks for this great plugin, it work perfectly but I would like to know what is the best way to unfix an element.

I aim to stop the script when my windows.width < 768px

Thanks

jeremie-baboukhian avatar Aug 31 '13 13:08 jeremie-baboukhian

Sorry for the late reply, I just forgot this issue.

To unfix an element you could change the selector and reset/remove css "top" and "position".

$('.fixer').fixer();

// ...

$(window).on('resize', function () {
  var isSmallDevice = $(window).width() < 768;

  if (isSmallDevice) {
    $('.fixer').removeClass('fixer').css({
      position: '',
      top: ''
    });
  }
});

yckart avatar Jan 07 '14 14:01 yckart

I added possibility to use $('.selector').fixer('pause'); and $('.selector').fixer('pause'); in pull request #4 with version 1.0.0. Tks

jeffdrumgod avatar Aug 16 '15 21:08 jeffdrumgod

thx for the feedback

jeremie-baboukhian avatar Aug 18 '15 18:08 jeremie-baboukhian