Snap.js icon indicating copy to clipboard operation
Snap.js copied to clipboard

Snap.js only for certain resolutions?

Open notflip opened this issue 11 years ago • 2 comments

I'm using twitter bootstrap, Is it possible to disable snap.js when the screen gets to large? or when the drawer div is hidden.

thanks!

notflip avatar Nov 13 '13 15:11 notflip

I would love to see an answer on this one to. I tried something like this:

$(window).resize(function () { if ($(window).width() < 1024) { snapper.enable(); } else { snapper.disable(); } });

But that doesn't seem to work. I think it has something to do with the event handler, because i added a toggle button wich works like this:

addEvent(document.getElementById('open-right'), 'click', function(){ if( snapper.state().state=="right" ){ snapper.close('right'); }else { snapper.open('right'); } });

I can´t seem to find anny documentation on how to use the enable and disable functions. I also opened a question on stackoverflow: http://stackoverflow.com/questions/21890876/how-can-i-dynamically-enable-and-disable-snap-js-by-jakiestfu

Thanks in advance!

KoenJacobs avatar Feb 23 '14 09:02 KoenJacobs

Вообще ахуели, челу не помогли даже...

ghost avatar Jul 13 '14 11:07 ghost