Advertisement
julong

javascript full slider background image

Aug 8th, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. <?php
  2. $images = Works::all()->take(5);
  3. //var_dump($images);
  4. ?>
  5. <script type="text/javascript">
  6. jQuery(function($){
  7.  
  8. $.supersized({
  9. // Functionality
  10. slideshow : 1, // Slideshow on/off
  11. autoplay : 1, // Slideshow starts playing automatically
  12. start_slide : 1, // Start slide (0 is random)
  13. stop_loop : 0, // Pauses slideshow on last slide
  14. random : 1, // Randomize slide order (Ignores start slide)
  15. slide_interval : 3000, // Length between transitions
  16. transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
  17. transition_speed : 1000, // Speed of transition
  18. new_window : 1, // Image links open in new window/tab
  19. pause_hover : 0, // Pause slideshow on hover
  20. keyboard_nav : 1, // Keyboard navigation on/off
  21. performance : 1, // 0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)
  22. image_protect : 1, // Disables image dragging and right click with Javascript
  23.  
  24. // Size & Position
  25. min_width : 0, // Min width allowed (in pixels)
  26. min_height : 0, // Min height allowed (in pixels)
  27. vertical_center : 1, // Vertically center background
  28. horizontal_center : 1, // Horizontally center background
  29. fit_always : 0, // Image will never exceed browser width or height (Ignores min. dimensions)
  30. fit_portrait : 1, // Portrait images will not exceed browser height
  31. fit_landscape : 0, // Landscape images will not exceed browser width
  32.  
  33. // Components
  34. slide_links : 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank')
  35. thumb_links : 1, // Individual thumb links for each slide
  36. thumbnail_navigation : 1, // Thumbnail navigation
  37. slides : // Slideshow Images
  38. <?php
  39. $imgarray = array();
  40. foreach ($images as $img){
  41. $imgs = array(
  42. "image" => URL::to("files/lg".$img->img),
  43. "title" => $img->title,
  44. "thumb" => URL::to("files/thumb".$img->img),
  45. "url" => $img->id,
  46. );
  47. array_push($imgarray,$imgs);
  48. ?>
  49. <?php
  50. }
  51. echo json_encode($imgarray);
  52. ?>
  53. ,
  54. // Theme Options
  55. progress_bar : 1, // Timer for each slide
  56. mouse_scrub : 0
  57.  
  58. });
  59. });
  60. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement