Sunday 15 April 2012

responsive design - jQuery - Execute scripts based on screen size -


Is the screen / device size above xxx pixels wide, is it possible to run just a few jQuery scripts?

So, for example, I want to run slideshows only when people are viewing the site on devices larger than 1024px. If someone goes to a mobile, then I want all the images to appear on top of each other ... "post-text" itemprop = "text">

You $ (Window) Width ()

  ($ (window). Width ()> = 1024) {// do your stuff}   

demo --- & gt;

No comments:

Post a Comment