How to get the current scroll top position?
How to get the current scroll top position? Copy and past the following codes below to your JS file.
var current_scroll = window.scrollY; console.log( current_scroll );
Add Woocommerce product category image using GeneratePress WordPress theme in few steps. You need to access your functions.php. Either on a parent theme or a child theme. In my case I’m using a child theme so gonna paste the codes below on child themes functions.php Please copy the code below and paste it into your…
Customize rtmedia gallery ( media-gallery-item.php ) with additional display like image, audio, video, etc. Are you having a problem adding custom information on the media gallery item? You don’t have to worry now, the codes below is the solution. In my example, I want to add an audio player and the same time this is…
This code is to display the current browser name of your browser. $browser = new Browser(); echo $browser_detect->getBrowser('browser_name:Browser:private'); // browser name echo $browser->getVersion(); // browser version Then this code is to be placed to your function.php file of your current theme get_template_part( 'browser' ); Then create a new file browser.php inside of your current theme…
Dequeue or deregister a style or script of JS Composer WordPress plugin using your current theme functions.php. Paste the codes below. <link rel='stylesheet' id='js_composer_front-css' href='http://mytravelpersonality.com/temp/wp-content/plugins/js_composer/assets/css/js_composer.min.css?ver=5.0.1' type='text/css' media='all' /> <script type='text/javascript' src='http://mytravelpersonality.com/temp/wp-content/plugins/js_composer/assets/js/dist/js_composer_front.min.js?ver=5.0.1'></script> add_filter( 'vc_shortcode_output', 'anton_vc_shortcode_output', 10, 4 ); function anton_vc_shortcode_output($output, $xx, $atts ){ wp_dequeue_style( 'js_composer_front' ); wp_dequeue_script( 'wpb_composer_front_js' ); return $output; }
Colorbox default parameters defaults = { transition: "elastic", speed: 300, width: false, initialWidth: "600", innerWidth: false, maxWidth: false, height: false, initialHeight: "450", innerHeight: false, maxHeight: false, scalePhotos: true, scrolling: true, inline: false, html: false, iframe: false, fastIframe: true, photo: false, href: false, title: false, rel: false, opacity: 0.9, preloading: true, current: "image {current} of {total}",…
jQuery( document ).ready( function(){ var custom_timeout = ( function() { var timers = {}; return function ( callback, ms, uniqueId ) { if ( !uniqueId ) { uniqueId = "Don't call this twice without a uniqueId"; } if ( timers[uniqueId] ) { clearTimeout ( timers[uniqueId] ); } timers[uniqueId] = setTimeout( callback, ms ); }; })();…