| Server IP : 104.26.4.103 / Your IP : 216.73.216.4 Web Server : nginx/1.27.1 System : Linux in-5 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : arabianexpress ( 1872) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /storage/v9321/rimskannur/public_html/wp-content/themes/skole/vamtam/assets/js/ |
Upload File : |
/* jshint esversion: 6 */
(function( v, undefined ) {
'use strict';
// scroll to top button
{
var st_buttons = document.querySelectorAll( '.vamtam-scroll-to-top' );
if ( st_buttons.length ) {
var side_st_button = document.getElementById( 'scroll-to-top' ),
pageMiddle = window.innerHeight / 2;
if ( side_st_button ) {
v.addScrollHandler( {
init: function() {},
measure: function() {
pageMiddle = window.innerHeight / 2;
},
mutate: function( cpos ) {
if ( cpos > pageMiddle ) {
side_st_button.style.opacity = 1;
side_st_button.style.transform = 'scale3d( 1, 1, 1 )';
} else {
side_st_button.style.opacity = '';
side_st_button.style.transform = '';
}
}
} );
}
document.addEventListener( 'click', ( e ) => {
if ( e.target.closest( '.vamtam-scroll-to-top' ) ) {
e.preventDefault();
// iOS Safari uses a simple animation, normal browsers use scroll-behavior:smooth
if ( /iPad|iPhone|iPod/.test( navigator.userAgent ) && ! window.MSStream ) {
window.scrollTo( 0, 0 );
} else {
window.scroll( { left: 0, top: 0, behavior: 'smooth' } );
}
}
}, true );
}
}
})( window.VAMTAM );