Optimize base JS
parent
003a868690
commit
7631915e00
|
@ -0,0 +1,44 @@
|
|||
let mobileMenuState = false;
|
||||
|
||||
$(function() {
|
||||
let height = $('#imHeader').height();
|
||||
let stickyBar = $('#imStickyBarContainer');
|
||||
let topButton = $('#to-top');
|
||||
let stickyHeight = stickyBar.height();
|
||||
|
||||
$(window).on('scroll', {passive: true}, function(event) {
|
||||
if(mobileMenuState) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(window.scrollY > height) {
|
||||
stickyBar.css('visibility', 'visible');
|
||||
stickyBar.css('top', '0');
|
||||
stickyBar.addClass('scroll-sticky');
|
||||
topButton.removeClass('imHidden');
|
||||
}
|
||||
else {
|
||||
stickyBar.css('top', '-' + stickyHeight + "px");
|
||||
stickyBar.removeClass('scroll-sticky');
|
||||
topButton.addClass('imHidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('.hamburger-component').on('click', function(event) {
|
||||
mobileMenuState = !mobileMenuState;
|
||||
let bar = $('#imStickyBarContainer');
|
||||
bar.css('visibility', bar.css('visibility') == 'hidden' ? 'visible' : 'hidden');
|
||||
$('#nav-sticky-container > ul').toggleClass('hidden');
|
||||
$('#imPageExtContainer').toggleClass('darken');
|
||||
});
|
||||
|
||||
$('#to-top-link').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
let target = this.hash;
|
||||
$('html').animate({
|
||||
'scrollTop': $('#imGoToCont').offset().top
|
||||
}, 900, 'swing', function() {
|
||||
window.location.hash = target;
|
||||
});
|
||||
});
|
||||
});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,57 +0,0 @@
|
|||
function animatedimage_imFooter_pluginAppObj_03() {
|
||||
|
||||
//WXPA-897. Control variable if i clicked on mobile the side div
|
||||
var hoverEvent_imFooter_pluginAppObj_03;
|
||||
|
||||
$(document).ready(function(){
|
||||
//Triggering the back side visibility
|
||||
switch("mouseover"){
|
||||
case "click":
|
||||
$('#iandt_imFooter_pluginAppObj_03 .wrapper').click( function(){
|
||||
$(this).toggleClass('back-visible');
|
||||
});
|
||||
break;
|
||||
case "timer":
|
||||
setInterval(function() {
|
||||
$('#iandt_imFooter_pluginAppObj_03 .wrapper').toggleClass('back-visible');
|
||||
},2000);
|
||||
break;
|
||||
case "mouseover":
|
||||
$('#iandt_imFooter_pluginAppObj_03 .wrapper').hover(function(e){
|
||||
hoverEvent_imFooter_pluginAppObj_03 = true;
|
||||
$(this).addClass('back-visible');
|
||||
setTimeout(function(){
|
||||
hoverEvent_imFooter_pluginAppObj_03 = false;
|
||||
}, 100);
|
||||
}, function(){
|
||||
hoverEvent_imFooter_pluginAppObj_03 = false;
|
||||
$(this).removeClass('back-visible');
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
if(isMobile && "move-bottom" == "none"){
|
||||
//WXPA-897. Fix mobile hover/click. I need to manage click only for "none" effect
|
||||
$('#iandt_imFooter_pluginAppObj_03 .wrapper a').each(function(){
|
||||
// Cache event
|
||||
var existing_event = this.onclick;
|
||||
// Remove the event from the link
|
||||
this.onclick = null;
|
||||
// Add a check in for the class wrapper if present back-visible
|
||||
$(this).click(function(){
|
||||
if(!hoverEvent_imFooter_pluginAppObj_03 &&
|
||||
$('#iandt_imFooter_pluginAppObj_03 .wrapper').hasClass('back-visible')) {
|
||||
// Reattach your original onclick
|
||||
if(existing_event) $(this).click(existing_event);
|
||||
}
|
||||
else{
|
||||
hoverEvent_imFooter_pluginAppObj_03 = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
function animatedimage_imFooter_pluginAppObj_05() {
|
||||
|
||||
//WXPA-897. Control variable if i clicked on mobile the side div
|
||||
var hoverEvent_imFooter_pluginAppObj_05;
|
||||
|
||||
$(document).ready(function(){
|
||||
//Triggering the back side visibility
|
||||
switch("mouseover"){
|
||||
case "click":
|
||||
$('#iandt_imFooter_pluginAppObj_05 .wrapper').click( function(){
|
||||
$(this).toggleClass('back-visible');
|
||||
});
|
||||
break;
|
||||
case "timer":
|
||||
setInterval(function() {
|
||||
$('#iandt_imFooter_pluginAppObj_05 .wrapper').toggleClass('back-visible');
|
||||
},2000);
|
||||
break;
|
||||
case "mouseover":
|
||||
$('#iandt_imFooter_pluginAppObj_05 .wrapper').hover(function(e){
|
||||
hoverEvent_imFooter_pluginAppObj_05 = true;
|
||||
$(this).addClass('back-visible');
|
||||
setTimeout(function(){
|
||||
hoverEvent_imFooter_pluginAppObj_05 = false;
|
||||
}, 100);
|
||||
}, function(){
|
||||
hoverEvent_imFooter_pluginAppObj_05 = false;
|
||||
$(this).removeClass('back-visible');
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
if(isMobile && "flip-vert" == "none"){
|
||||
//WXPA-897. Fix mobile hover/click. I need to manage click only for "none" effect
|
||||
$('#iandt_imFooter_pluginAppObj_05 .wrapper a').each(function(){
|
||||
// Cache event
|
||||
var existing_event = this.onclick;
|
||||
// Remove the event from the link
|
||||
this.onclick = null;
|
||||
// Add a check in for the class wrapper if present back-visible
|
||||
$(this).click(function(){
|
||||
if(!hoverEvent_imFooter_pluginAppObj_05 &&
|
||||
$('#iandt_imFooter_pluginAppObj_05 .wrapper').hasClass('back-visible')) {
|
||||
// Reattach your original onclick
|
||||
if(existing_event) $(this).click(existing_event);
|
||||
}
|
||||
else{
|
||||
hoverEvent_imFooter_pluginAppObj_05 = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
function animatedimage_pluginAppObj_119() {
|
||||
|
||||
//WXPA-897. Control variable if i clicked on mobile the side div
|
||||
var hoverEvent_pluginAppObj_119;
|
||||
|
||||
$(document).ready(function(){
|
||||
//Triggering the back side visibility
|
||||
switch("mouseover"){
|
||||
case "click":
|
||||
$('#iandt_pluginAppObj_119 .wrapper').click( function(){
|
||||
$(this).toggleClass('back-visible');
|
||||
});
|
||||
break;
|
||||
case "timer":
|
||||
setInterval(function() {
|
||||
$('#iandt_pluginAppObj_119 .wrapper').toggleClass('back-visible');
|
||||
},2000);
|
||||
break;
|
||||
case "mouseover":
|
||||
$('#iandt_pluginAppObj_119 .wrapper').hover(function(e){
|
||||
hoverEvent_pluginAppObj_119 = true;
|
||||
$(this).addClass('back-visible');
|
||||
setTimeout(function(){
|
||||
hoverEvent_pluginAppObj_119 = false;
|
||||
}, 100);
|
||||
}, function(){
|
||||
hoverEvent_pluginAppObj_119 = false;
|
||||
$(this).removeClass('back-visible');
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
if(isMobile && "move-bottom" == "none"){
|
||||
//WXPA-897. Fix mobile hover/click. I need to manage click only for "none" effect
|
||||
$('#iandt_pluginAppObj_119 .wrapper a').each(function(){
|
||||
// Cache event
|
||||
var existing_event = this.onclick;
|
||||
// Remove the event from the link
|
||||
this.onclick = null;
|
||||
// Add a check in for the class wrapper if present back-visible
|
||||
$(this).click(function(){
|
||||
if(!hoverEvent_pluginAppObj_119 &&
|
||||
$('#iandt_pluginAppObj_119 .wrapper').hasClass('back-visible')) {
|
||||
// Reattach your original onclick
|
||||
if(existing_event) $(this).click(existing_event);
|
||||
}
|
||||
else{
|
||||
hoverEvent_pluginAppObj_119 = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
function animatedimage_pluginAppObj_122() {
|
||||
|
||||
//WXPA-897. Control variable if i clicked on mobile the side div
|
||||
var hoverEvent_pluginAppObj_122;
|
||||
|
||||
$(document).ready(function(){
|
||||
//Triggering the back side visibility
|
||||
switch("mouseover"){
|
||||
case "click":
|
||||
$('#iandt_pluginAppObj_122 .wrapper').click( function(){
|
||||
$(this).toggleClass('back-visible');
|
||||
});
|
||||
break;
|
||||
case "timer":
|
||||
setInterval(function() {
|
||||
$('#iandt_pluginAppObj_122 .wrapper').toggleClass('back-visible');
|
||||
},2000);
|
||||
break;
|
||||
case "mouseover":
|
||||
$('#iandt_pluginAppObj_122 .wrapper').hover(function(e){
|
||||
hoverEvent_pluginAppObj_122 = true;
|
||||
$(this).addClass('back-visible');
|
||||
setTimeout(function(){
|
||||
hoverEvent_pluginAppObj_122 = false;
|
||||
}, 100);
|
||||
}, function(){
|
||||
hoverEvent_pluginAppObj_122 = false;
|
||||
$(this).removeClass('back-visible');
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
if(isMobile && "move-bottom" == "none"){
|
||||
//WXPA-897. Fix mobile hover/click. I need to manage click only for "none" effect
|
||||
$('#iandt_pluginAppObj_122 .wrapper a').each(function(){
|
||||
// Cache event
|
||||
var existing_event = this.onclick;
|
||||
// Remove the event from the link
|
||||
this.onclick = null;
|
||||
// Add a check in for the class wrapper if present back-visible
|
||||
$(this).click(function(){
|
||||
if(!hoverEvent_pluginAppObj_122 &&
|
||||
$('#iandt_pluginAppObj_122 .wrapper').hasClass('back-visible')) {
|
||||
// Reattach your original onclick
|
||||
if(existing_event) $(this).click(existing_event);
|
||||
}
|
||||
else{
|
||||
hoverEvent_pluginAppObj_122 = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
function animatedimage_pluginAppObj_125() {
|
||||
|
||||
//WXPA-897. Control variable if i clicked on mobile the side div
|
||||
var hoverEvent_pluginAppObj_125;
|
||||
|
||||
$(document).ready(function(){
|
||||
//Triggering the back side visibility
|
||||
switch("mouseover"){
|
||||
case "click":
|
||||
$('#iandt_pluginAppObj_125 .wrapper').click( function(){
|
||||
$(this).toggleClass('back-visible');
|
||||
});
|
||||
break;
|
||||
case "timer":
|
||||
setInterval(function() {
|
||||
$('#iandt_pluginAppObj_125 .wrapper').toggleClass('back-visible');
|
||||
},2000);
|
||||
break;
|
||||
case "mouseover":
|
||||
$('#iandt_pluginAppObj_125 .wrapper').hover(function(e){
|
||||
hoverEvent_pluginAppObj_125 = true;
|
||||
$(this).addClass('back-visible');
|
||||
setTimeout(function(){
|
||||
hoverEvent_pluginAppObj_125 = false;
|
||||
}, 100);
|
||||
}, function(){
|
||||
hoverEvent_pluginAppObj_125 = false;
|
||||
$(this).removeClass('back-visible');
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
if(isMobile && "move-bottom" == "none"){
|
||||
//WXPA-897. Fix mobile hover/click. I need to manage click only for "none" effect
|
||||
$('#iandt_pluginAppObj_125 .wrapper a').each(function(){
|
||||
// Cache event
|
||||
var existing_event = this.onclick;
|
||||
// Remove the event from the link
|
||||
this.onclick = null;
|
||||
// Add a check in for the class wrapper if present back-visible
|
||||
$(this).click(function(){
|
||||
if(!hoverEvent_pluginAppObj_125 &&
|
||||
$('#iandt_pluginAppObj_125 .wrapper').hasClass('back-visible')) {
|
||||
// Reattach your original onclick
|
||||
if(existing_event) $(this).click(existing_event);
|
||||
}
|
||||
else{
|
||||
hoverEvent_pluginAppObj_125 = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
function animatedimage_pluginAppObj_126() {
|
||||
|
||||
//WXPA-897. Control variable if i clicked on mobile the side div
|
||||
var hoverEvent_pluginAppObj_126;
|
||||
|
||||
$(document).ready(function(){
|
||||
//Triggering the back side visibility
|
||||
switch("mouseover"){
|
||||
case "click":
|
||||
$('#iandt_pluginAppObj_126 .wrapper').click( function(){
|
||||
$(this).toggleClass('back-visible');
|
||||
});
|
||||
break;
|
||||
case "timer":
|
||||
setInterval(function() {
|
||||
$('#iandt_pluginAppObj_126 .wrapper').toggleClass('back-visible');
|
||||
},2000);
|
||||
break;
|
||||
case "mouseover":
|
||||
$('#iandt_pluginAppObj_126 .wrapper').hover(function(e){
|
||||
hoverEvent_pluginAppObj_126 = true;
|
||||
$(this).addClass('back-visible');
|
||||
setTimeout(function(){
|
||||
hoverEvent_pluginAppObj_126 = false;
|
||||
}, 100);
|
||||
}, function(){
|
||||
hoverEvent_pluginAppObj_126 = false;
|
||||
$(this).removeClass('back-visible');
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
if(isMobile && "move-bottom" == "none"){
|
||||
//WXPA-897. Fix mobile hover/click. I need to manage click only for "none" effect
|
||||
$('#iandt_pluginAppObj_126 .wrapper a').each(function(){
|
||||
// Cache event
|
||||
var existing_event = this.onclick;
|
||||
// Remove the event from the link
|
||||
this.onclick = null;
|
||||
// Add a check in for the class wrapper if present back-visible
|
||||
$(this).click(function(){
|
||||
if(!hoverEvent_pluginAppObj_126 &&
|
||||
$('#iandt_pluginAppObj_126 .wrapper').hasClass('back-visible')) {
|
||||
// Reattach your original onclick
|
||||
if(existing_event) $(this).click(existing_event);
|
||||
}
|
||||
else{
|
||||
hoverEvent_pluginAppObj_126 = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue