jQuery Backstretch not resizing -
i have backstretch initializing once page loaded. after that, have event method changes background image backstretch. once event runs backstretch no longer resize other elements except 1 has been updated.
does backstretch have single event instance window resizing? if there can fix this?
thanks!
example:
$('body').backstretch('woot.jpg'); $('#menu-home').backstretch('dog.jpg'); $('#menu-about').backstretch('cat.jpg'); $('#menu-contact').backstretch('iguana.jpg'); $('#menu-home').on('click', function(){ $('body').backstretch('dog.jpg'); });
i use backstretch in 1 div takes visible area of browser, can scroll down , rest of page doesn't have background. adjust on windows resize found no other way using javascript:
window.onresize = homepageresize; function homepageresize() { $('#landingtop').css({ 'height': ($(window).innerheight()) + 'px' }); }
Comments
Post a Comment