* Startseite
* Sidebar-Widgets: Reisemagazin, Reiseführer, Angebote git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3301 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
353b758bcd
commit
4278e110fc
12 changed files with 305 additions and 381 deletions
|
|
@ -2,7 +2,7 @@ jQuery(document).ready(function($) {
|
|||
"use strict";
|
||||
|
||||
/* ==============================================
|
||||
VIDEOS
|
||||
VIDEOS -->
|
||||
=============================================== */
|
||||
|
||||
var videos$ = $('a[id^="video_"]');
|
||||
|
|
@ -61,7 +61,7 @@ jQuery(document).ready(function($) {
|
|||
});
|
||||
|
||||
/* ==============================================
|
||||
KEYWORDS
|
||||
KEYWORDS -->
|
||||
=============================================== */
|
||||
|
||||
var modal$ = $('#st-default-modal');
|
||||
|
|
@ -77,6 +77,65 @@ jQuery(document).ready(function($) {
|
|||
return false;
|
||||
});
|
||||
|
||||
/* ==============================================
|
||||
SIDEBAR BOX SLIDER -->
|
||||
=============================================== */
|
||||
|
||||
function createSlider(ctx$)
|
||||
{
|
||||
function setSlideInterval()
|
||||
{
|
||||
if(slideInterval)
|
||||
{
|
||||
clearInterval(slideInterval);
|
||||
}
|
||||
slideInterval = setInterval(function() {
|
||||
|
||||
jumpToNextSlide();
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
function jumpToNextSlide()
|
||||
{
|
||||
setActiveSlide(slideIndex === slideCount - 1 ? 0 : slideIndex + 1);
|
||||
setSlideInterval();
|
||||
}
|
||||
|
||||
function setActiveSlide(newIndex)
|
||||
{
|
||||
slide$s[slideIndex].removeClass('active');
|
||||
slideIndex = newIndex;
|
||||
slide$s[slideIndex].addClass('active');
|
||||
}
|
||||
|
||||
var slides$ = $('.slide', ctx$);
|
||||
var slideCount = slides$.length;
|
||||
if(slideCount > 1)
|
||||
{
|
||||
var slideInterval;
|
||||
|
||||
var slide$s = [];
|
||||
for(var i = 0; i < slideCount; ++i)
|
||||
{
|
||||
slide$s.push($(slides$.get(i)));
|
||||
}
|
||||
|
||||
var slideIndex = 0;
|
||||
setSlideInterval();
|
||||
|
||||
$('.item-button-next', ctx$).click(function() {
|
||||
jumpToNextSlide();
|
||||
});
|
||||
$('.item-button-prev', ctx$).click(function() {
|
||||
setActiveSlide(slideIndex === 0 ? slideCount - 1 : slideIndex - 1);
|
||||
setSlideInterval();
|
||||
});
|
||||
}
|
||||
}
|
||||
$('.box-slider').each(function() {
|
||||
createSlider($(this));
|
||||
});
|
||||
|
||||
/* ==============================================
|
||||
HEADER STICKY -->
|
||||
=============================================== */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue