Skip to content

Instantly share code, notes, and snippets.

@Mouad-BGD
Created June 7, 2012 12:55
Show Gist options
  • Select an option

  • Save Mouad-BGD/2888670 to your computer and use it in GitHub Desktop.

Select an option

Save Mouad-BGD/2888670 to your computer and use it in GitHub Desktop.
Js
$(window).resize(function() { if ($(document).width() < 720) toggleImagesSlides()
else toggleImagesSlides();
});
toggleImagesSlides(){
if they are already loaded just toggle thier visbility else load them [via ajax]
}
$(document).ready(function() {
if ((screen.width>=1024) [&& (screen.height>=768)]) {
jQuery
------
$(window).width(); // returns width of browser viewport
$(document).width(); // returns width of HTML document
other function: .outerWidth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment