Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function () {
- function a() {
- $('.accordion .accordion-section-title').removeClass('active');
- $('.accordion .accordion-section-content').slideUp(300).removeClass('open')
- }
- $('.accordion-section-title').click(function (b) {
- var c = $(this).attr('href');
- if ($(b.target).is('.active')) {
- a()
- } else {
- a();
- $(this).addClass('active');
- $('.accordion ' + c).slideDown(300).addClass('open')
- }
- b.preventDefault()
- });
- $('.frame-border').fitVids();
- $(window).on('scroll', function () {
- if ($(window).scrollTop() > 600) {
- $('#mobile-nav-btn').addClass('is-big')
- } else {
- $('#mobile-nav-btn').removeClass('is-big')
- }
- });
- $('.scroll-to').on('click', function (b) {
- b.preventDefault();
- var c = $(this.hash);
- $('body,html').animate({
- scrollTop: c.offset().top
- }, 600);
- if ($(this).hasClass('mobile')) {
- $('#mobile-nav-btn').toggleClass('active');
- $('body').toggleClass('mobile-menu-active');
- $('#overlay-nav').toggleClass('open')
- }
- });
- $('#mobile-nav-btn').on('click', function (b) {
- b.preventDefault();
- $(this).toggleClass('active');
- $('body').toggleClass('mobile-menu-active');
- $('#overlay-nav').toggleClass('open')
- });
- $('#close-agb').on('click', function (b) {
- b.preventDefault();
- $('body').toggleClass('mobile-menu-active');
- $('#agb-text').toggleClass('show');
- $('#close-agb').toggleClass('is-big')
- });
- /*Functions to show the content via AJAX*/
- $('#show-impress').click(function (b) {
- b.preventDefault();
- $('body').toggleClass('mobile-menu-active');
- $('#agb-text').toggleClass('show');
- $('#close-agb').toggleClass('is-big');
- cargar('#agb-text>div.container','impressum');
- });
- $('#show-agb').click(function (b) {
- b.preventDefault();
- $('body').toggleClass('mobile-menu-active');
- $('#agb-text').toggleClass('show');
- $('#close-agb').toggleClass('is-big');
- cargar('#agb-text>div.container','agb');
- });
- function limpiarModal() {
- if($.trim( $('#agb-text>div.container').html() ).length) {
- $('#agb-text>div.container').empty();
- }
- }
- var url = "http://join.tim-gabel.com/page/";
- function cargar(selector,page) {
- limpiarModal();
- if(page=="agb" || page=="impressum") {
- $(selector).html("Loading...");
- $.ajax({
- url: url + page + ".html",
- type: "GET"
- })
- .done(function (html) {
- $(selector).html(html);
- })
- .fail(function () {
- alert("error");
- });
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment