Advertisement
iasr

Untitled

Feb 27th, 2013
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. var featured = '.flexslider.feat_slider';
  2. var bios = '.flexslider.ab_slider';
  3.  
  4. $(featured).flexslider({
  5.  
  6. animation: "slide", //String: Select your animation type, "fade" or "slide"
  7. direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
  8. startAt: 3, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
  9. slideshow: false, //Boolean: Animate slider automatically
  10. animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds
  11.  
  12. // Usability features
  13. useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available
  14. touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
  15.  
  16. // Primary Controls
  17. controlNav: true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
  18.  
  19. // Special properties
  20. manualControls: "#feat_nav li", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
  21.  
  22. // Callback API
  23.  
  24. start: function(){
  25. var title = ".feat_title_box";
  26.  
  27. $(title).addClass('modernHide');
  28. },
  29.  
  30. //Callback: function(slider) - Fires after each slider animation completes
  31. after: function(){
  32. var slide = ".flex-active-slide";
  33. var title = ".flex-active-slide .feat_title_box";
  34. var titlewidth = $(title).width();
  35. var titleheight = $(title).height();
  36. var slidewidth = $(slide).width();
  37. var slideheight = $(slide).height();
  38. var side1 = ( slidewidth - titlewidth );
  39. var top1 = ( slideheight - titleheight );
  40. var side2 = ( slidewidth - titlewidth ) / 2;
  41. var top2 = ( slideheight - titleheight ) / 2;
  42. var titleFix = [ { 'padding-left' : side2, 'top' : top2 } ];
  43.  
  44. $(title).css(titleFix[0]).addClass('fadeInLeft');
  45.  
  46. // TitleBox Fading Entrances
  47. },
  48.  
  49. //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
  50. end: function(){},
  51.  
  52. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement