Advertisement
srikat

home.js

May 7th, 2015
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. jQuery(function( $ ){
  2.  
  3. // Local Scroll Speed
  4. $.localScroll({
  5. duration: 750
  6. });
  7.  
  8. // Image Section Height
  9. var windowHeight = $( window ).height();
  10.  
  11. $( '.image-section' ) .css({'height': windowHeight +'px'});
  12.  
  13. $( window ).resize(function(){
  14.  
  15. var windowHeight = $( window ).height();
  16.  
  17. $( '.image-section' ) .css({'height': windowHeight +'px'});
  18.  
  19. });
  20.  
  21. // Create an array of images that you'd like to use
  22. var images = [
  23. 'http://rts.beyostudio.com/wp-content/themes/rebeccathompson/images/backstretch-1.jpg',
  24. 'http://rts.beyostudio.com/wp-content/themes/rebeccathompson/images/backstretch-2.jpg',
  25. 'http://rts.beyostudio.com/wp-content/themes/rebeccathompson/images/backstretch-3.jpg'
  26. ];
  27.  
  28. $('body.home').backstretch(images, {
  29. fade: 750,
  30. duration: 4000
  31. });
  32.  
  33. $(window).one('backstretch.after', function () {
  34. $('.backstretch').after('<div class="linear-gradient"></div>');
  35. $('.linear-gradient').fadeIn(1000);
  36. });
  37.  
  38. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement