06 Feb
This commit is contained in:
parent
98bd71c760
commit
8b2ec705c9
83 changed files with 3467 additions and 1214 deletions
|
|
@ -1,5 +1,54 @@
|
|||
window.currentScroll = 0;
|
||||
|
||||
|
||||
|
||||
var collapse_on_responsive = function() {
|
||||
if (jQuery(document).width() < 992) {
|
||||
jQuery('.widget').find('.collapse-widget:not(.open)').addClass('collapsed');
|
||||
jQuery('.widget').find('.collapse:not(.open)').removeClass('in');
|
||||
}else{
|
||||
jQuery('.widget').find('.collapse-widget:not(.open)').removeClass('collapsed');
|
||||
jQuery('.widget').find('.collapse:not(.open)').addClass('in');
|
||||
}
|
||||
};
|
||||
|
||||
collapse_on_responsive();
|
||||
|
||||
$(window).on('resize',function(e){
|
||||
collapse_on_responsive();
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
function scrollToTabContent(tabSelector){
|
||||
$("html, body").animate({
|
||||
scrollTop: $(tabSelector).offset().top - 220
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function activateTravelDatesTab(){
|
||||
$('[href=\'#travel-dates-content-tab\']').first().on('shown.bs.tab', function () {
|
||||
scrollToTabContent('#travel-dates-content-tab');
|
||||
});
|
||||
$('[href=\'#travel-dates-content-tab\']').first().tab('show');
|
||||
}
|
||||
$('.nav-tabs > li > a').click(function(){
|
||||
if($(this).data('toggle') === 'tab'){
|
||||
return
|
||||
}
|
||||
scrollToTabContent($(this).attr('href'));
|
||||
});
|
||||
|
||||
$('#st-slider-booking-events-scroll').click(function (event) {
|
||||
event.preventDefault();
|
||||
activateTravelDatesTab();
|
||||
});
|
||||
|
||||
if (location.hash === '#travel-dates-content-tab'){
|
||||
activateTravelDatesTab();
|
||||
}
|
||||
});
|
||||
|
||||
window.currentScroll = 0;
|
||||
jQuery('body').removeClass('no-js');
|
||||
|
||||
|
||||
|
|
@ -117,12 +166,8 @@ jQuery("#topMain a.dropdown-toggle").bind("click", function(e) {
|
|||
return true;
|
||||
|
||||
});
|
||||
jQuery(document).ready(function($) {
|
||||
if (jQuery(document).width() < 768) {
|
||||
jQuery('.widget').find('.collapse-widget').addClass('collapsed');
|
||||
jQuery('.widget').find('.collapse').removeClass('in');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
"use strict";
|
||||
|
|
@ -145,64 +190,7 @@ jQuery(document).ready(function($) {
|
|||
}
|
||||
})});
|
||||
|
||||
/* ==============================================
|
||||
VIDEOS -->
|
||||
=============================================== */
|
||||
|
||||
/* var videos$ = $('a[id^="video_"]');
|
||||
|
||||
function videoInitHandler()
|
||||
{
|
||||
var el$ = $(this);
|
||||
|
||||
var text = el$.text();
|
||||
var length = text.length - 11;
|
||||
var caption = text.substring(0, length);
|
||||
var expl = this.id.substring(6, this.id.length);
|
||||
|
||||
$('<iframe />')
|
||||
.attr({
|
||||
width: '100%',
|
||||
height: 500,
|
||||
src: 'https://www.youtube-nocookie.com/embed/'+ expl,
|
||||
frameborder: 0,
|
||||
allowfullscreen: true,
|
||||
'data-st-video': this.id
|
||||
})
|
||||
.hide()
|
||||
.insertAfter(this)
|
||||
;
|
||||
el$
|
||||
.addClass('st-collapsed')
|
||||
//.css('background-image', 'url(/images/st2/icons/arrowup.gif)')
|
||||
.text(caption + ' einblenden')
|
||||
.attr('href', 'javascript:void(0);')
|
||||
;
|
||||
}
|
||||
|
||||
videos$.each(videoInitHandler);
|
||||
|
||||
videos$.click(function() {
|
||||
|
||||
var el$ = $(this);
|
||||
var video$ = $('[data-st-video='+ this.id +']');
|
||||
var text = el$.text();
|
||||
var length = text.length - 11;
|
||||
var caption = text.substring(0, length);
|
||||
|
||||
if (el$.hasClass('st-collapsed'))
|
||||
{
|
||||
video$.slideDown('slow');
|
||||
el$.text(caption + ' ausblenden');
|
||||
el$.removeClass('st-collapsed');
|
||||
}
|
||||
else
|
||||
{
|
||||
video$.slideUp(400);
|
||||
el$.text(caption + ' einblenden');
|
||||
el$.addClass('st-collapsed');
|
||||
}
|
||||
});*/
|
||||
|
||||
|
||||
/* ==============================================
|
||||
|
|
@ -299,6 +287,8 @@ jQuery(document).ready(function($) {
|
|||
/* ==============================================
|
||||
nav-tabs -->
|
||||
=============================================== */
|
||||
|
||||
/*
|
||||
var scrollBarWidths = 40;
|
||||
var windowW = $(window).width();
|
||||
|
||||
|
|
@ -331,7 +321,7 @@ jQuery(document).ready(function($) {
|
|||
else {
|
||||
$('.scroller-right-nav-tabs').hide();
|
||||
}
|
||||
|
||||
|
||||
if (getLeftPosi()<0) {
|
||||
$('.scroller-left-nav-tabs').show();
|
||||
}
|
||||
|
|
@ -341,12 +331,12 @@ jQuery(document).ready(function($) {
|
|||
}
|
||||
}
|
||||
|
||||
if(windowW <= 992){
|
||||
if(windowW <= 992){
|
||||
reAdjust();
|
||||
}
|
||||
$(window).on('resize',function(e){
|
||||
$(window).on('resize',function(e){
|
||||
var windowW = $(window).width();
|
||||
if(windowW <= 992){
|
||||
if(windowW <= 992){
|
||||
reAdjust();
|
||||
}else{
|
||||
$('.scroller-right-nav-tabs').hide();
|
||||
|
|
@ -356,7 +346,7 @@ jQuery(document).ready(function($) {
|
|||
|
||||
|
||||
$('.scroller-right-nav-tabs').click(function() {
|
||||
|
||||
|
||||
if(((getLeftPosi()*-1) + $('.wrapper-nav-tabs').outerWidth()) < (widthOfHidden()*-1)){
|
||||
$('.scroller-left-nav-tabs').fadeIn('slow');
|
||||
$('.list-nav-tabs').animate({left:"+="+($('.wrapper-nav-tabs').outerWidth()*-1)+"px"},'slow',function(){
|
||||
|
|
@ -369,7 +359,7 @@ jQuery(document).ready(function($) {
|
|||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('.scroller-left-nav-tabs').click(function() {
|
||||
|
|
@ -389,24 +379,26 @@ jQuery(document).ready(function($) {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
/* ==============================================
|
||||
MENU HOVER -->
|
||||
=============================================== */
|
||||
if($(window).width() > 768){
|
||||
|
||||
$(".header .navbar-nav .dropdown:not(.openClick)").hover(
|
||||
$(".header .navbar-nav .dropdown:not(.openClick)").hover(
|
||||
function() {
|
||||
$(".dropdown.openClick").removeClass('open');
|
||||
$('.dropdown-menu', this).stop( true, true ).slideDown("fast");
|
||||
$('.bootstrap-select.open').removeClass('open');
|
||||
$(this).toggleClass('open');
|
||||
$(this).toggleClass('open');
|
||||
},
|
||||
function() {
|
||||
$('.dropdown-menu', this).stop( true, true ).slideUp("fast");
|
||||
$(this).toggleClass('open');
|
||||
$(this).toggleClass('open');
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -424,18 +416,18 @@ jQuery(document).ready(function($) {
|
|||
$('.selectpicker').selectpicker({
|
||||
dropupAuto: false
|
||||
});
|
||||
|
||||
|
||||
|
||||
/* ==============================================
|
||||
nav-tabs -->
|
||||
=============================================== */
|
||||
$('.nav-tabs li a').click(function (e) {
|
||||
$('.nav-tabs li a').click(function (e) {
|
||||
//get selected href
|
||||
var href = $(this).attr('href');
|
||||
|
||||
var href = $(this).attr('href');
|
||||
|
||||
//set all nav tabs to inactive
|
||||
$('.nav-tabs li').removeClass('active');
|
||||
|
||||
|
||||
//get all nav tabs matching the href and set to active
|
||||
$('.nav-tabs li a[href="'+href+'"]').closest('li').addClass('active');
|
||||
|
||||
|
|
@ -443,12 +435,11 @@ jQuery(document).ready(function($) {
|
|||
$('.tab-pane').removeClass('active');
|
||||
$('.tab-pane'+href).addClass('active');
|
||||
|
||||
if($(this).parents('.nav-tabs-bottom').length){
|
||||
$('html, body').animate({
|
||||
scrollTop: ($(".content-copy").offset().top + 200)
|
||||
}, 500);
|
||||
}
|
||||
|
||||
if($('#position-scroll-tab').length){
|
||||
$('html, body').animate({
|
||||
scrollTop: ($("#position-scroll-tab").offset().top - 220)
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
/* ==============================================
|
||||
|
|
@ -466,11 +457,10 @@ jQuery(document).ready(function($) {
|
|||
=============================================== */
|
||||
|
||||
function toggleChevron(e) {
|
||||
console.log(e.target);
|
||||
var $i = $(e.target)
|
||||
.parent('.panel-group')
|
||||
.find("i.indicator");
|
||||
|
||||
|
||||
$i.toggleClass('icon-minus icon-plus');
|
||||
|
||||
if($i.hasClass('icon-minus')){
|
||||
|
|
@ -478,13 +468,12 @@ jQuery(document).ready(function($) {
|
|||
}
|
||||
if($i.hasClass('icon-plus')){
|
||||
$i.parent('h3').find('span').html('Reiseleistungen einblenden');
|
||||
}
|
||||
}
|
||||
}
|
||||
$('#accordion').on('hidden.bs.collapse', toggleChevron);
|
||||
$('#accordion').on('shown.bs.collapse', toggleChevron);
|
||||
|
||||
function toggleChevron2(e) {
|
||||
console.log(e.target);
|
||||
var $i = $(e.target)
|
||||
.parent('.panel-group')
|
||||
.find("i.indicator");
|
||||
|
|
@ -502,7 +491,6 @@ jQuery(document).ready(function($) {
|
|||
$('#accordion_pd').on('shown.bs.collapse', toggleChevron2);
|
||||
|
||||
function toggleChevron3(e) {
|
||||
console.log(e.target);
|
||||
var $i = $(e.target)
|
||||
.parent('.panel-group')
|
||||
.find("i.indicator");
|
||||
|
|
@ -547,7 +535,7 @@ jQuery(document).ready(function($) {
|
|||
nav:true,
|
||||
dots:false,
|
||||
navText: [
|
||||
"<i class='fa fa-angle-right'></i>",
|
||||
"<i class='fa fa-angle-right'></i>",
|
||||
"<i class='fa fa-angle-left'></i>"],
|
||||
responsive:{
|
||||
0:{
|
||||
|
|
@ -592,7 +580,7 @@ jQuery(document).ready(function($) {
|
|||
});
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==============================================
|
||||
DATEPICKER -->
|
||||
=============================================== */
|
||||
|
|
@ -603,7 +591,7 @@ jQuery(document).ready(function($) {
|
|||
$(this).attr('readonly', 'true');
|
||||
}
|
||||
});
|
||||
$( ".datepicker" ).datepicker({
|
||||
$( ".datepicker" ).datepicker({
|
||||
dateFormat: 'dd.mm.yy', prevText: '<zurück', prevStatus: '',
|
||||
prevJumpText: '<<', prevJumpStatus: '',
|
||||
nextText: 'Vor>', nextStatus: '',
|
||||
|
|
@ -663,4 +651,122 @@ jQuery(document).ready(function($) {
|
|||
initAutoEndDate(searchForm$.find('[name=b]'), searchForm$.find('[name=e]'));
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("a.scroll-to-jump").click(function(e)
|
||||
{
|
||||
$(window).t
|
||||
rigger('resize');
|
||||
e.preventDefault();
|
||||
var aid = $(this).attr('href');
|
||||
aid = aid.replace("#", "");
|
||||
aTag = $("[id='"+ aid +"']");
|
||||
if(aTag !== null && aTag.offset() !== null){
|
||||
$("html, body").animate({
|
||||
scrollTop: aTag.offset().top - 220
|
||||
}, 1000);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function initGoTo() {
|
||||
|
||||
//Variables
|
||||
if(!$('.js-go-to').length){
|
||||
return;
|
||||
}
|
||||
var $this = $('.js-go-to'),
|
||||
$target = $this.data('target'),
|
||||
showEffect = $this.data('show-effect'),
|
||||
position = $this.data('position'),
|
||||
type = $this.data('type'),
|
||||
hideEffect = $this.data('hide-effect'),
|
||||
offsetTop = $this.data('offset-top'),
|
||||
targetOffsetTop = function () {
|
||||
return $target ? $($target).offset().top : 0;
|
||||
};
|
||||
|
||||
if (type == 'static') {
|
||||
$this.css({
|
||||
'display': 'inline-block'
|
||||
});
|
||||
} else {
|
||||
$this.addClass('animated').css({
|
||||
'display': 'inline-block',
|
||||
'position': type,
|
||||
'opacity': 0
|
||||
});
|
||||
}
|
||||
|
||||
if (type == 'fixed' || type == 'absolute') {
|
||||
$this.css(position);
|
||||
}
|
||||
|
||||
$this.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$('html, body').stop().animate({
|
||||
'scrollTop': targetOffsetTop()
|
||||
}, 800);
|
||||
});
|
||||
|
||||
if (!$this.data('offset-top') && !$this.hasClass('js-animation-was-fired') && type != 'static') {
|
||||
if ($this.offset().top <= $(window).height()) {
|
||||
$this.show();
|
||||
|
||||
setTimeout(function () {
|
||||
$this.addClass('js-animation-was-fired ' + showEffect).css({
|
||||
'opacity': ''
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (type != 'static') {
|
||||
$(window).on('scroll', function () {
|
||||
if ($this.data('offset-top')) {
|
||||
if ($(window).scrollTop() >= offsetTop && !$this.hasClass('js-animation-was-fired')) {
|
||||
$this.show();
|
||||
|
||||
setTimeout(function () {
|
||||
$this.addClass('js-animation-was-fired ' + showEffect).css({
|
||||
'opacity': ''
|
||||
});
|
||||
});
|
||||
} else if ($(window).scrollTop() <= offsetTop && $this.hasClass('js-animation-was-fired')) {
|
||||
$this.removeClass('js-animation-was-fired ' + showEffect);
|
||||
|
||||
setTimeout(function () {
|
||||
$this.addClass(hideEffect).css({
|
||||
'opacity': 0
|
||||
});
|
||||
}, 100);
|
||||
|
||||
setTimeout(function () {
|
||||
$this.removeClass(hideEffect).hide();
|
||||
}, 400);
|
||||
}
|
||||
} else {
|
||||
var thisOffsetTop = $this.offset().top;
|
||||
|
||||
if (!$this.hasClass('js-animation-was-fired')) {
|
||||
if ($(window).scrollTop() >= thisOffsetTop - $(window).height()) {
|
||||
$this.show();
|
||||
|
||||
setTimeout(function () {
|
||||
$this.addClass('js-animation-was-fired ' + showEffect).css({
|
||||
'opacity': ''
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(window).trigger('scroll');
|
||||
}
|
||||
}
|
||||
|
||||
initGoTo();
|
||||
Loading…
Add table
Add a link
Reference in a new issue