jQuery(document).ready(function($) { $('#hero-unit-slider').unslider({ autoplay: true, infinite: true, nav: false, delay: 5000, arrows: { // Unslider default behaviour prev: '', next: '', } }); $('#about-image-slider').unslider({ // animateHeight: true, nav: false, autoplay: true, arrows: { // Unslider default behaviour prev: '', next: '', } }); $('#testimonials-slider').unslider({ // animateHeight: true, animation: 'vertical', nav: false, autoplay: true, delay : 3000, arrows: { // Unslider default behaviour prev: '', next: '', } }); // remove novalidate attribute from the comment form form html5 validation $("#commentform").removeAttr("novalidate"); // woocommerce review link scroll $("a.woocommerce-review-link").click(function(e) { e.preventDefault(); var target = $(this).attr('href'); $('html,body').animate({ scrollTop:$(target).offset().top}, 1500); }); // comment scroll using hash # value var hash = location.hash.replace('#',''); // get the hash value if(hash != ''){ $('html, body').animate({ scrollTop:$('#'+hash).offset().top}, 2000); } // removing the empty footer-entry element if ( '' === $.trim( $( 'footer.entry-footer' ).text() ) ) { $( 'footer.entry-footer' ).remove(); } //disable the empty link clicks $('a[href="#"]').click( function( e ){ e.preventDefault(); }); });