milardovich

IE9 Fix Clean

Jan 21st, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function () {
  2.   function a() {
  3.     $('.accordion .accordion-section-title').removeClass('active');
  4.     $('.accordion .accordion-section-content').slideUp(300).removeClass('open')
  5.   }
  6.   $('.accordion-section-title').click(function (b) {
  7.     var c = $(this).attr('href');
  8.     if ($(b.target).is('.active')) {
  9.       a()
  10.     } else {
  11.       a();
  12.       $(this).addClass('active');
  13.       $('.accordion ' + c).slideDown(300).addClass('open')
  14.     }
  15.     b.preventDefault()
  16.   });
  17.   $('.frame-border').fitVids();
  18.   $(window).on('scroll', function () {
  19.     if ($(window).scrollTop() > 600) {
  20.       $('#mobile-nav-btn').addClass('is-big')
  21.     } else {
  22.       $('#mobile-nav-btn').removeClass('is-big')
  23.     }
  24.   });
  25.   $('.scroll-to').on('click', function (b) {
  26.     b.preventDefault();
  27.     var c = $(this.hash);
  28.     $('body,html').animate({
  29.       scrollTop: c.offset().top
  30.     }, 600);
  31.     if ($(this).hasClass('mobile')) {
  32.       $('#mobile-nav-btn').toggleClass('active');
  33.       $('body').toggleClass('mobile-menu-active');
  34.       $('#overlay-nav').toggleClass('open')
  35.     }
  36.   });
  37.   $('#mobile-nav-btn').on('click', function (b) {
  38.     b.preventDefault();
  39.     $(this).toggleClass('active');
  40.     $('body').toggleClass('mobile-menu-active');
  41.     $('#overlay-nav').toggleClass('open')
  42.   });
  43.   $('#close-agb').on('click', function (b) {
  44.     b.preventDefault();
  45.     $('body').toggleClass('mobile-menu-active');
  46.     $('#agb-text').toggleClass('show');
  47.     $('#close-agb').toggleClass('is-big')
  48.   });
  49.  
  50.   /*Functions to show the content via AJAX*/
  51.   $('#show-impress').click(function (b) {
  52.     b.preventDefault();
  53.     $('body').toggleClass('mobile-menu-active');
  54.     $('#agb-text').toggleClass('show');
  55.     $('#close-agb').toggleClass('is-big');
  56.     cargar('#agb-text>div.container','impressum');
  57.   });
  58.   $('#show-agb').click(function (b) {
  59.     b.preventDefault();
  60.     $('body').toggleClass('mobile-menu-active');
  61.     $('#agb-text').toggleClass('show');
  62.     $('#close-agb').toggleClass('is-big');
  63.     cargar('#agb-text>div.container','agb');
  64.   });
  65.   function limpiarModal() {
  66.     if($.trim( $('#agb-text>div.container').html() ).length) {
  67.       $('#agb-text>div.container').empty();
  68.     }
  69.   }
  70.   var url = "http://join.tim-gabel.com/page/";
  71.    
  72.     function cargar(selector,page) {
  73.         limpiarModal();
  74.         if(page=="agb" || page=="impressum") {
  75.             $(selector).html("Loading...");
  76.             $.ajax({
  77.                 url: url + page + ".html",
  78.                 type: "GET"
  79.             })
  80.                 .done(function (html) {
  81.                     $(selector).html(html);
  82.                 })
  83.                 .fail(function () {
  84.                     alert("error");
  85.                 });
  86.         }
  87.     }
  88. });
Advertisement
Add Comment
Please, Sign In to add comment