//Responsive menu js
jQuery(document).ready(function () {
jQuery("#top-menu").aceResponsiveMenu({
resizeWidth: '991', // Set the same in Media query
animationSpeed: 'fast', //slow, medium, fast
accoridonExpAll: false //Expands all the accordion menu on click
});
});
// Sticky header JS//
jQuery('#fs-main-navbar').affix({
offset: {
top: 70
}
});
// testimonial Carousel JS (Our Student Saying)//
jQuery('.fs-testimonial-carousel').owlCarousel({
margin:30,
loop:true,
items:2,
nav:false,
dots:true,
autoplay: true,
smartSpeed: 1000,
autoplayTimeout:4000,
autoplayHoverPause:true,
responsive:{
0:{
items:1,
nav:false
},
600:{
items:2,
nav:false
},
1000:{
items:2,
nav:false,
loop:true
}
}
})
//Wow js (Animate)
jQuery(document).ready(function($){wow = new WOW({boxClass:'wow', animateClass: 'animated',offset: 0, mobile: true,live:true});wow.init();});
// Mini Cart Menu Slide Js
jQuery(document).on("hide.bs.dropdown", ".dropdown", function (event) {
jQuery(event.target).find(">.dropdown-menu:first").slideUp();
});
jQuery(document).on("show.bs.dropdown", ".dropdown", function (event) {
jQuery(event.target).find(">.dropdown-menu:first").slideDown();
});
// Portfolio Filter js
jQuery(document).ready(function(){
jQuery(".fs-filter-button").click(function(){
var value = jQuery(this).attr('data-filter');
if(value == "all")
{
jQuery('.fs-single-item').show('slow');
}
else
{
jQuery(".fs-single-item").not('.'+value).hide('slow');
jQuery('.fs-single-item').filter('.'+value).show('slow');
}
});
jQuery('.fs-filter-buttons li').each(function(i,v){
if(i == 0){
jQuery(this).addClass("current");
}
});
jQuery('.fs-filter-buttons li').click(function(){
jQuery(this).addClass('current').siblings().removeClass('current');
});
});
// Portfolio Image Popup js
jQuery(document).ready(function() {
jQuery('.popup-gallery').magnificPopup({
delegate: '.gallery-zoom',
type: 'image',
tLoading: 'Loading image #%curr%...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0,1] // Will preload 0 - before current, and 1 after the current image
},
image: {
tError: 'The image #%curr% could not be loaded.',
titleSrc: function(item) {
//return item.el.attr('title') + 'by Solodev';
}
}
});
});
//Pricing plan js
jQuery(".pricing_plan_enquiry").click(function(){var $this=jQuery(this);var plan_name=$this.attr("plan-name");var plan_price=$this.attr("plan-price");jQuery("#pricing_enquiry_fullname").val('');jQuery("#pricing_enquiry_email").val('');jQuery("#pricing_enquiry_phonenumber").val('');jQuery("#pricing_enquiry_servicetype").val('0');jQuery("#pricing_enquiry_weburl").val('');jQuery("#pricing_enquiry_plan").val('');jQuery("#pricing_enquiry_plan_dis").val('');jQuery("#pricing_enquiry_msg").val('');jQuery("#pricing_enquiry_plan").val(plan_name);jQuery("#pricing_enquiry_plan_dis").val(plan_name);jQuery('#enq_err_name').html("");jQuery('#enq_err_email').html("");jQuery('#enq_err_phone').html("");jQuery('#enq_err_servicetype').html("");jQuery('#enq_err_weburl').html("");jQuery('#enq_err_msg').html("");jQuery("#main_pricing_enq_form").show();jQuery("#pricing_enquiry_modal .modal-header h4").html("Pricing Plan Details");jQuery("#pricing_enquiry_modal .modal-footer").css("display","block");jQuery("#enquiry_form_response").hide()})
jQuery("#pricing_plan_enquiry_form").on("submit",function(event){var $this=jQuery(this);event.preventDefault();jQuery('#enquiry_form_response').empty();var data={action:'submit_pricing_enquiry_form',data:jQuery(this).serialize()};jQuery.post(ajax_obj.ajaxurl,data,function(response){if(response.pricing_enquiry_fullname){jQuery('#enq_err_name').html(response.pricing_enquiry_fullname);$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_fullname").focus()}
else if(response.pricing_enquiry_email){jQuery('#enq_err_email').html(response.pricing_enquiry_email);$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_email").focus()}
else if(response.pricing_enquiry_phonenumber){jQuery('#enq_err_phone').html(response.pricing_enquiry_phonenumber);$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_phonenumber").focus()}
else if(response.pricing_enquiry_servicetype){jQuery('#enq_err_servicetype').html(response.pricing_enquiry_servicetype);$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_servicetype").focus()}
else if(response.pricing_enquiry_weburl){jQuery('#enq_err_weburl').html(response.pricing_enquiry_weburl);$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_weburl").focus()}
else if(response.pricing_enquiry_msg){jQuery('#enq_err_msg').html(response.pricing_enquiry_msg);$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_msg").focus()}
if(response.is_mail_sent==1)
{$this.parents("#pricing_enquiry_modal").find(".modal-header h4").html("Congratulations!");$this.parents("#pricing_enquiry_modal").find(".modal-footer").css("display","none");$this.parents("#pricing_enquiry_modal").find("#main_pricing_enq_form").hide();$this.parents("#pricing_enquiry_modal").find("#enquiry_form_response").show();$this.parents("#pricing_enquiry_modal").find("#enquiry_form_response").append(response.responce_msg);$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_fullname").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_email").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_phonenumber").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_servicetype").val('0');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_weburl").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_plan").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_plan_dis").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_msg").val('')}
else if(response.is_mail_sent==0)
{$this.parents("#pricing_enquiry_modal").find(".modal-header h4").html("Oops! Something went wrong!");$this.parents("#pricing_enquiry_modal").find(".modal-footer").css("display","none");$this.parents("#pricing_enquiry_modal").find("#main_pricing_enq_form").hide();$this.parents("#pricing_enquiry_modal").find("#enquiry_form_response").show();$this.parents("#pricing_enquiry_modal").find("#enquiry_form_response").append(response.responce_msg);$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_fullname").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_email").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_phonenumber").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_servicetype").val('0');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_weburl").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_plan").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_plan_dis").val('');$this.parents("#pricing_enquiry_modal").find("#pricing_enquiry_msg").val('')}},'json')})
//TO REMOVE ERROR MSG
function remove_errorMsg(input_id,err_id)
{var input_val=jQuery("#"+input_id).val();if(input_val.trim()!='')
{jQuery('#'+err_id).html('')}}
// Scroll top js
jQuery(window).scroll(function() {if (jQuery(this).scrollTop() > 50 ) {jQuery('.fs-scrolltop:hidden').stop(true, true).fadeIn();} else {jQuery('.fs-scrolltop').stop(true, true).fadeOut();}});
jQuery(function(){jQuery(".fs-scroll").click(function(){jQuery("html,body").animate({scrollTop:jQuery("html,body").offset().top},"1000");return false})})