Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(".main-slider").bxSlider({
- //mode:'fade',
- controls:false,
- pager: 'true',
- auto:false,
- onSlideBefore:function($slideElement, oldIndex, newIndex){
- var newBg = $slideElement.find("span.banner-bg img").attr("src");
- $slideElement.css( 'background-image', 'url(' + newBg+ ')');
- },
- onSliderLoad: function(currentIndex){
- $(".main-slider li").each(function(){
- var newBg = $(this).find("span.banner-bg img").attr("src");
- $(this).css( 'background-image', 'url(' + newBg+ ')');
- });
- }
- });
Add Comment
Please, Sign In to add comment