Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var featured = '.flexslider.feat_slider';
- var bios = '.flexslider.ab_slider';
- $(featured).flexslider({
- animation: "slide", //String: Select your animation type, "fade" or "slide"
- direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
- startAt: 3, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
- slideshow: false, //Boolean: Animate slider automatically
- animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds
- // Usability features
- useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available
- touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
- // Primary Controls
- controlNav: true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
- // Special properties
- 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.
- // Callback API
- start: function(){
- var title = ".feat_title_box";
- $(title).addClass('modernHide');
- },
- //Callback: function(slider) - Fires after each slider animation completes
- after: function(){
- var slide = ".flex-active-slide";
- var title = ".flex-active-slide .feat_title_box";
- var titlewidth = $(title).width();
- var titleheight = $(title).height();
- var slidewidth = $(slide).width();
- var slideheight = $(slide).height();
- var side1 = ( slidewidth - titlewidth );
- var top1 = ( slideheight - titleheight );
- var side2 = ( slidewidth - titlewidth ) / 2;
- var top2 = ( slideheight - titleheight ) / 2;
- var titleFix = [ { 'padding-left' : side2, 'top' : top2 } ];
- $(title).css(titleFix[0]).addClass('fadeInLeft');
- // TitleBox Fading Entrances
- },
- //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
- end: function(){},
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement