// Theme Search Box jQuery(document).ready(function() { //wow js new WOW().init(); jQuery("#search-button").click(function() { jQuery(".search-box").addClass("show-box"); }); jQuery("#close-button").click(function() { jQuery(".search-box").removeClass("show-box"); }); }); // Counter js // jQuery(".circle_percent").each(function() { var $this = jQuery(this), $dataV = $this.data("percent"), $dataDeg = $dataV * 3.6, $round = $this.find(".round_per"); $round.css("transform", "rotate(" + parseInt($dataDeg + 180) + "deg)"); $this.append('
'); $this.prop('Counter', 0).animate({Counter: $dataV}, { duration: 2000, easing: 'swing', step: function (now) { $this.find(".percent_text").text(Math.ceil(now)+"%"); } }); if($dataV >= 51){ $round.css("transform", "rotate(" + 360 + "deg)"); setTimeout(function(){ $this.addClass("percent_more"); },1000); setTimeout(function(){ $round.css("transform", "rotate(" + parseInt($dataDeg + 180) + "deg)"); },1000); } }); //________graph images moving function by = jquery.bgscroll.js ________// function bg_moving(){ jQuery( function() { jQuery('.bg-moving').bgscroll({scrollSpeed:20 , direction:'h' }); }); } // Slide show animation /*Scroll to top when arrow up clicked BEGIN*/ jQuery(window).scroll(function() { var height = jQuery(window).scrollTop(); if (height > 100) { jQuery('.fs-scroll').fadeIn(); } else { jQuery('.fs-scroll').fadeOut(); } }); jQuery(document).ready(function() { bg_moving() jQuery(".fs-scroll").click(function(event) { event.preventDefault(); jQuery("html, body").animate({ scrollTop: 0 }, "slow"); return false; }); }); //sticky navbar jQuery(window).on("scroll",function(a){ 190The image #%curr% could not be loaded.', titleSrc: function(item) { //return item.el.attr('title') + 'by Marsel Van Oosten'; } } }); }); jQuery( document ).on( 'click', '.pt-like-it', function() { var post_id = jQuery(this).find('.like-button').attr('data-id'), nonce = jQuery(this).find('.like-button').attr("data-nonce"); jQuery.ajax({ url : ajax_obj.ajaxurl, type : 'post', data : { action : 'pt_like_it', post_id : post_id, nonce : nonce }, success : function( data_return ) { var obj=jQuery.parseJSON(data_return); if(obj.success==1) { jQuery('#like-count-'+post_id).html(obj.likesCount); jQuery('#post-like-heart-'+post_id).removeClass(); jQuery('#post-like-heart-'+post_id).addClass(obj.heartCss); } else { alert("Something went wrong!"); } } }); });