Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 31st, 2012  |  syntax: None  |  size: 3.04 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Getting supersized.js and jquery cycle to animate at the same time
  2. $(document).ready(function(){
  3.             $.supersized({
  4.  
  5.                 //Functionality
  6.                 slideshow               :   1,      //Slideshow on/off
  7.                 autoplay                :   1,      //Slideshow starts playing automatically
  8.                 start_slide             :   1,      //Start slide (0 is random)
  9.                 random                  :   0,      //Randomize slide order (Ignores start slide)
  10.                 slide_interval          :   5000,   //Length between transitions
  11.                 transition              :   1,      //0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
  12.                 transition_speed        :   400,    //Speed of transition
  13.                 new_window              :   1,      //Image links open in new window/tab
  14.                 pause_hover             :   0,      //Pause slideshow on hover
  15.                 keyboard_nav            :   1,      //Keyboard navigation on/off
  16.                 performance             :   1,      //0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)
  17.                 image_protect           :   1,      //Disables image dragging and right click with Javascript
  18.                 image_path              :   'images/', //Default image path
  19.  
  20.                 //Size & Position
  21.                 min_width               :   0,      //Min width allowed (in pixels)
  22.                 min_height              :   0,      //Min height allowed (in pixels)
  23.                 vertical_center         :   0,      //Vertically center background
  24.                 horizontal_center       :   1,      //Horizontally center background
  25.                 fit_portrait            :   1,      //Portrait images will not exceed browser height
  26.                 fit_landscape           :   0,      //Landscape images will not exceed browser width
  27.  
  28.                 //Components
  29.                 navigation              :   0,      //Slideshow controls on/off
  30.                 thumbnail_navigation    :   0,      //Thumbnail navigation
  31.                 slide_counter           :   0,      //Display slide numbers
  32.                 slide_captions          :   0,      //Slide caption (Pull from "title" in slides array)
  33.                 slides                  :   [       //Slideshow Images
  34.                                                     {image : 'images/bg3.jpg'},  
  35.                                                     {image : 'images/bg2.jpg'},
  36.                                                     {image : 'images/bg1.jpg'}
  37.  
  38.  
  39.                                             ]
  40.  
  41.             });
  42.         });
  43.  
  44.         $(document).ready(function() {
  45. $('h1.home_headline').cycle({
  46.     fx: 'scrollRight', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
  47.     speed:   400,
  48.     timeout: 5000,
  49.     delay:    1000,
  50.     autostop:      true,     // true to end slideshow after X transitions (where X == slide count)
  51.     autostopCount: 25,
  52.  
  53. });