TikTok World 2021

TikTok World 2021


TikTok World 2021 0 && $(“#shadowContent .layoutContent”).length > 0 ) { $(“#pageContent .mainContent”).animate({opacity:0}, ANIM, “swing”, function() { checkLanguage(); const h = $(“#shadowContent .mainContent”).height(); SHADOW = false; $(“#pageContent .mainContent”).removeClass($(“#pageContent .mainContent”).attr(‘class’)) .html($(“#shadowContent .mainContent”).html()) .addClass($(“#shadowContent .mainContent”).attr(‘class’)) .animate({opacity:1},ANIM); $(“#shadowContent”).html(“”); expandLocales(); if( withForm ) { loadForm(formData); } }); } else if( $(“#pageContent .layoutWelcome”).length > 0 && $(“#shadowContent .layoutWelcome”).length > 0 ) { $(“#pageContent .welcomeContent”).animate({opacity:0}, ANIM, “swing”, function() { checkLanguage(); const h = $(“#shadowContent .welcomeContent”).innerHeight(); SHADOW = false; $(“#pageContent .welcomeContent”).html($(“#shadowContent .welcomeContent”).html()).animate({opacity:1},ANIM); $(“#shadowContent”).html(“”); expandLocales(); if( withForm ) { loadForm(formData); } }); } else { $(“#pageContent”).fadeOut( 400, function() { checkLanguage(); SHADOW = false; $(“#pageContent”).css({opacity:0}).html(content).show().animate({opacity:1},400); $(“#shadowContent”).html(“”); expandLocales(); if( withForm ) { loadForm(formData); } }); } } function checkLanguage() { const lang = $(“#shadowContent > :first”).attr(“data-language”); if( lang !== undefined ) { $(“html”).attr(“lang”,lang); var dir = $(“#shadowContent > :first”).attr(“data-direction”); if( dir == undefined ) { dir = “ltr”; } $(“html”).attr(“dir”,dir); } } function loadForm(formData) { $(“#pageContent input”).each( function() { const n = $(this).attr(“name”); const v = formData.input[n]; if( v !== undefined ) { //console.log(“set input “+n,v); $(this).val(v); } }); $(“#pageContent select”).each( function() { const n = $(this).attr(“name”); const v = formData.select[n]; if( v !== undefined ) { //console.log(“set select “+n,v); $(this).val(v); } }); } function pageupdate() { if( location.hash ) { var h = location.hash; h = h.replace(‘#’,’/’); //console.log(h); $.ajax({url: h, success: function(res) { load(res); }, error: function() { location.href=”/”; } }); } else { $.get(“/welcome”, function(html) { load(html); }); } } $( function() { pageupdate(); /* $(“body”).on(‘click’,’a’, function() { const href = $(this).attr(“href”); if( href.match(/^http/) ) { location.href = href; } else { $.get(href, function(content) { location.hash = href.replace(/^//,”); load(content); }); } return false; });*/ $(“body”).on(‘focus’,’input’, function() { $(this).siblings(‘.input-label’).addClass(‘input-label-focus’); }).on(‘blur’,’input’, function() { $(this).siblings(‘.input-label’).removeClass(‘input-label-focus’); }).on(‘click’,’.input-label’, function() { $(this).siblings(‘input’).focus(); }).on(‘change’,’.welcomeContent select.setlocale’, function() { $.post( “/welcome?setlocale=”+$(this).val(), function(res) { load(res); }); }).on(‘click’,’#modalBG,#modalClose’, function() { $(“#modalBG,#modalContainer”).fadeOut(); $(“#modalContainer”).removeClass(“modalContainerVisible”); }).on(‘click’,’.modal-support’, function() { $.get(“/support”, function(html) { $(“#modalContent”).html(html); $(“#modalContainer,#modalBG”).fadeIn(); $(“#modalContainer”).addClass(“modalContainerVisible”); }); return false; }).on(‘click’,’.modal-faq’, function() { $.get(“/faq”, function(html) { $(“#modalContent”).html(html); $(“#modalContainer,#modalBG”).fadeIn(); $(“#modalContainer”).addClass(“modalContainerVisible”); }); return false; }); $(window).bind(‘hashchange’, pageupdate); $(window).bind(‘error’, function(e) { console.log(“Error”,e); }); }); ]]>

Source

Leave a Reply

Close Menu
×
×

Cart