Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var width = w.innerWidth;
- var height = w.innerHeight;
- setInterval(function () {
- if (w.innerWidth !== width || w.innerHeight !== height) {
- width = w.innerWidth;
- height = w.innerHeight;
- $(w).trigger('resolutionchange');
- }
- }, 50);
- $(w).bind('resolutionchange',
- function () {
- if (width > 1200) {
- ... something ...;
- }
- if (width <= 1200 && width > 992) {
- ... something ...;
- }
- if (width <= 992) {
- ... something ...;
- }
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment