javascript - Remove jQuery effects if browser is certain size? -
i'm building responsive layout , utilising handful of jquery plugins, such tabs, drop menu, scroll top etc, 1 thing i'm struggling once browser in it's smallest position how take away jquery magic?
currently it's looking awful effects in smaller view, i'm looking couple of pointers or code example if don't mind.
e.g. if there's jquery if browser viewpoint =< 320px don't run etc?
i have done bit of research first before posting here, expert can assist.
one way try wrapping width condition inside $(window).resize event:
$(document).ready(function(){ $(window).resize(function() { if ($(window).width() <= 320) { // leave empty } else { // rest of jquery code can go here } }); });
Comments
Post a Comment