BxSlider fade issues
by yoowordpress
HTML
<script src="http://yourjavascript.com/0255033891/jquery-bxslider-min.js"></script>
<script src="<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">"></script>
<div id="slider-wrapper" class="slider-wrapper">
<div class="slider" id="slider">
<div class="toggle">
<div>
<ul>
<li><a href="profile.php">Gallery</a>
</li>
<li><a href="detail.php">Detail</a>
</li>
<li><a href="#">Slideshow</a>
</li>
</ul>
</div>
</div>
<div class="bx-controls-direction"> <span class="bx-direction prev bx-prev"><<</span><span class="bx-direction next bx-next">>></span>
</div>
<ul class="bxslider">
<li>
<div class="slide-caption">
<div class="slide-caption-content pull-left">
<h3>Woman on the Beach Photo</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<button class="btn btn-info pull-left">View Details</button> <span class="pull-left pad-left pad-top photo-count fine"><i> 6 photos of this object</i></span>
</div> <i class="icon-arrow-up expand-icon pull-right"></i>
</div>
<img src="http://placehold.it/1324x1080" title="title 1" />
</li>
<li>
<div class="slide-caption">
...
CSS
/* =Slideshow
-------------------------------------------------------------------------- */
html, body, .slider-wrapper {
width: 100%;
height: 100%;
margin: 0;
}
.slider-wrapper .toggle {
padding-left: 70px;
position: fixed;
width: 100%;
z-index: 51;
}
.slider-wrapper .bx-wrapper {
height: 100%;
margin: 0;
}
.slider-wrapper .bx-viewport {
border: none;
left: 0;
box-sizing: border-box;
height: 100% !important;
}
.slider-wrapper .slider {
height: 100%;
position: relative;
width: 100%;
}
.slider-wrapper .slider-controls {
left: 0;
position: absolute;
top: 100px;
z-index: 99;
}
.slider-wrapper .bxslider {
height: 100%;
margin: 0;
padding-left: 0;
}
.slider-wrapper .bxslider > li {
max-height: 100%;
}
.slider-wrapper .bxslider img {
position: relative;
max-width: none;
width: 100%;
}
.slide-caption {
background-color: rgba(0, 0, 0, 0.3);
bottom: 0;
color: #fff;
left: 0;
opacity: 0.25;
overflow: hidden;
padding: 25px;
position: absolute;
-webkit-transition: all 1s;
-moz-transition: all 1s;
-o-transition: all 1s;
transition: all 1s;
width: 100%;
z-index: 1;
}
.slide-caption h3 {
font-weight: normal;
line-height: 1em;
margin: 0 0 18px;
}
.slide-caption-content {
width: 90%;
}
.bx-controls-direction {
position: absolute;
top: 50%;
width: 100%;
}
.bx-direction {
background-color: rgba(51, 51, 51, 0.75);
color: #fff;
cursor: pointer;
font-size: 32px;
line-height: 70px;
position: absolute;
top: -35px;
width: 70px;
height: 70px;
text-align: center;
z-index: 51;
}
.bx-direction:hover {
background-color: rgba(3, 153, 182, 0.75);
}
.prev {
left: 0;
}
.next {
right: 0;
}
JavaScript
var slider = $('.bxslider').bxSlider({
adaptiveHeight: true,
auto: true,
autoControlsSelector: '.bx-start',
controls: false,
maxSlides: 1,
minSlides: 1,
mode: 'fade',
pager: false,
resposive: true,
tickerHover: true
});
$('.bx-next').click(function (e) {
slider.stopAuto();
slider.goToNextSlide();
startSlideshow();
});
$('.bx-prev').click(function (e) {
slider.stopAuto();
slider.goToPrevSlide();
startSlideshow();
});
$('.bx-pause').click(function (e) {
var $this = $(this);
if ($this.hasClass('is-paused')) {
startSlideshow();
} else {
stopSlideshow();
}
});
function startSlideshow() {
$('.bx-pause').removeClass('is-paused');
slider.startAuto();
};
function stopSlideshow() {
$('.bx-pause').addClass('is-paused');
slider.stopAuto();
};