feeback show, header css lazy
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3482 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
30c42d0508
commit
b28c7db598
24 changed files with 681 additions and 202 deletions
|
|
@ -11,6 +11,76 @@ var observer = lozad('.lozad', {
|
|||
observer.observe();
|
||||
|
||||
|
||||
|
||||
|
||||
var youtube_loader = function(self) {
|
||||
options = {
|
||||
width: 853,
|
||||
height: 480,
|
||||
autoplay: 1,
|
||||
rel: 0,
|
||||
class: "youtube-video",
|
||||
frameborder: "0",
|
||||
allowfullscreen: true
|
||||
};
|
||||
options.src = $(self).data('src') + "?rel=" + options.rel + "&autoplay=" + options.autoplay;
|
||||
ret = $(document.createElement("iframe"));
|
||||
var ele = $(self).parent().parent();
|
||||
ele.html("");
|
||||
ele.removeClass('video-wrap');
|
||||
ele.addClass('youtube');
|
||||
ele.append(ret);
|
||||
ret.attr(options);
|
||||
|
||||
};
|
||||
jQuery('a[data-type="youtube"]').on('click', function () {
|
||||
youtube_loader(this);
|
||||
|
||||
});
|
||||
|
||||
var youtube_sterntours_video_closer = function(self) {
|
||||
$('#show_sterntours_video_full').hide('slow', function () {
|
||||
$(this).html("");
|
||||
});
|
||||
$('#show_sterntours_video_sidebar').show();
|
||||
};
|
||||
|
||||
var youtube_sterntours_video_loader = function(self) {
|
||||
$('#show_sterntours_video_sidebar').hide();
|
||||
options = {
|
||||
width: 853,
|
||||
height: 480,
|
||||
autoplay: 1,
|
||||
rel: 0,
|
||||
class: "youtube-video",
|
||||
frameborder: "0",
|
||||
allowfullscreen: true
|
||||
};
|
||||
options.src = $(self).data('src') + "?rel=" + options.rel + "&autoplay=" + options.autoplay;
|
||||
div = $(document.createElement("div"));
|
||||
div.addClass('youtube');
|
||||
ret = $(document.createElement("iframe"));
|
||||
h1 = $(document.createElement("h1")).html("Wir: STERN TOURS <a href=\"#\" title=\"Close\" class=\"pull-right btn btn-default btn-close-video\" id=\"sterntorus_video_close\"><i class=\"fa fa-times\"></i> <span class=\"\"></span></a>");
|
||||
var ele = $('#show_sterntours_video_full');
|
||||
ele.html("");
|
||||
ele.append(h1);
|
||||
div.append(ret);
|
||||
ele.append(div);
|
||||
ret.attr(options);
|
||||
ele.show('slow');
|
||||
|
||||
jQuery('a#sterntorus_video_close').on('click', function () {
|
||||
youtube_sterntours_video_closer(this);
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
jQuery('a[data-type="youtube_sterntours_video"]').on('click', function () {
|
||||
youtube_sterntours_video_loader(this);
|
||||
});
|
||||
|
||||
|
||||
|
||||
jQuery("button.btn-mobile").bind("click", function(e) {
|
||||
e.preventDefault();
|
||||
jQuery(this).toggleClass('btn-mobile-active');
|
||||
|
|
@ -19,14 +89,11 @@ jQuery("button.btn-mobile").bind("click", function(e) {
|
|||
|
||||
if(jQuery(this).hasClass('btn-mobile-active')) {
|
||||
jQuery('body').append('<div id="menu-overlay"></div>');
|
||||
|
||||
if(!jQuery("#topMain").hasClass('nav-onepage') || window.width > 960) { /* onepage fix */
|
||||
jQuery('html').addClass('noscroll');
|
||||
window.currentScroll = jQuery(window).scrollTop();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if(!jQuery("#topMain").hasClass('nav-onepage') || window.width > 960) { /* onepage fix */
|
||||
jQuery('html,body').animate({scrollTop: currentScroll}, 300, 'easeInOutExpo');
|
||||
}
|
||||
|
|
@ -59,7 +126,6 @@ jQuery(document).ready(function($) {
|
|||
|
||||
jQuery(document).ready(function($) {
|
||||
"use strict";
|
||||
|
||||
window.addEventListener("load", function(){
|
||||
window.cookieconsent.initialise({
|
||||
"palette": {
|
||||
|
|
@ -83,7 +149,7 @@ jQuery(document).ready(function($) {
|
|||
VIDEOS -->
|
||||
=============================================== */
|
||||
|
||||
var videos$ = $('a[id^="video_"]');
|
||||
/* var videos$ = $('a[id^="video_"]');
|
||||
|
||||
function videoInitHandler()
|
||||
{
|
||||
|
|
@ -136,7 +202,8 @@ jQuery(document).ready(function($) {
|
|||
el$.text(caption + ' einblenden');
|
||||
el$.addClass('st-collapsed');
|
||||
}
|
||||
});
|
||||
});*/
|
||||
|
||||
|
||||
/* ==============================================
|
||||
KEYWORDS -->
|
||||
|
|
@ -147,9 +214,13 @@ jQuery(document).ready(function($) {
|
|||
$('a.show-layer').click(function() {
|
||||
|
||||
$.get($(this).attr('href')).then(function(r) {
|
||||
|
||||
modal$.find('.modal-body').html(r);
|
||||
modal$.find('a[id^="video_"]').each(videoInitHandler);
|
||||
modal$.find('a[data-type="youtube"]').on('click', function () {
|
||||
youtube_loader(this);
|
||||
});
|
||||
modal$.find('img.lozad').each(function () {
|
||||
$(this).attr('src', $(this).data('src'));
|
||||
});
|
||||
modal$.modal('show');
|
||||
});
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue