How to use contact form core php with jquery ajax

HTML Form <!-- .isrequired.error{border-color:red;} .alert{background:#f3f3f3 none repeat scroll 0 0;border:1px solid;border-radius:3px;margin-bottom:10px;padding:10px;} .alert{display:none;} .alert.alert-danger{color:red;} .alert.alert-success{color:green;} --> File: frontend-ajax.js jQuery(document).ready(function() { jQuery(".submit_contact_btn").click(function() { //on focus jQuery("#contact_form .isrequired, #contact_form .isrequired").focus(function(){ jQuery(this).removeClass('error'); }); //on blur jQuery("#contact_form .isrequired, #contact_form .isrequired").blur(function() { if(jQuery(this).val().trim() == '') { jQuery(this).addClass('error'); } else { jQuery(this).removeClass('error'); } }); if(jQuery("#firstname").val().trim() == '' || jQuery("#lastname").val().trim() == '' || … Continue reading How to use contact form core php with jquery ajax

Get specify category + Jquery + Ajax

Template file foreach ( $terms as $term ) : ?> echo '';endif; ?> jQuery(document).ready(function() { /* * Trigger window resize function in javascript */ function ESresize(){ if (typeof (Event) === 'function') { // modern browsers window.dispatchEvent(new Event('resize')); } else { //This will be executed on old browsers and especially IE var resizeEvent = window.document.createEvent('UIEvents'); resizeEvent.initUIEvent('resize', … Continue reading Get specify category + Jquery + Ajax

How to on click yotube video play in popup

<a href="JavaScript:Void(0);" data-toggle="modal" data-src="" data-target="#testimonial" class="d-block video-link video_btn"><img class="d-block w-100" src="" alt="" width="100%" height="100%" /> /********************************/ ✕ /********************************/ var $videoSrc; $('.video-link').click(function() { $videoSrc = $(this).data( "src" ); }); //console.log($videoSrc); // when the modal is opened autoplay it $('#testimonial').on('shown.bs.modal', function (e) { $("#testimonial_video").attr("src", $videoSrc + "?enablejsapi=1&rel=0&autoplay=1&amp;showinfo=0"); }) // stop playing the youtube video when I close … Continue reading How to on click yotube video play in popup

jquery ajax form

jQuery(document).ready(function() { jQuery(".submit_customer_btn").click(function() { /**************** Register ***************************/ jQuery("#notic_add_customer.alert").hide(); //on focus jQuery("#add_customer_form .isrequired, #add_customer_form .isrequired").focus(function(){ jQuery(this).removeClass('error'); }); //on blur jQuery("#add_customer_form .isrequired, #add_customer_form .isrequired").blur(function() { if(jQuery(this).val().trim() == '') { jQuery(this).addClass('error'); } else { jQuery(this).removeClass('error'); } }); if(jQuery("#firstname").val().trim() == '' || jQuery("#lastname").val().trim() == '' || jQuery("#mobile").val().trim() == '' || jQuery("#email").val().trim() == '' || jQuery("#streetaddress1").val().trim() == '' || jQuery("#zip").val().trim() … Continue reading jquery ajax form

How to use custom metabox form and ajax

function.php add code <?php // Register Custom Post Type function custom_post_type_order_book() { $labels = array( 'name' => _x( 'Book Orders', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Book Order', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Book Orders', 'text_domain' ), 'name_admin_bar' => __( 'Book Order', 'text_domain' ), 'archives' => __( 'Item … Continue reading How to use custom metabox form and ajax

How to use modal popup with tabs

<!-- Jquery --> jQuery(document).ready(function(){ $('.tabs li a:not(:first)').addClass('inactive'); $('.book-tab .containers').hide(); $('.book-tab .containers:first').show(); $('.tabs').each(function(){ $(this).find('li a').eq(0).removeClass('inactive'); $(this).parents('.mod-inner').find('.containers').eq(0).show(); }) $('.tabs li a').click(function(){ var t = $(this).attr('id'); if($(this).hasClass('inactive')){ //this is the start of our condition $(this).parents('.mod-inner').find('.tabs li a').addClass('inactive'); $(this).removeClass('inactive'); $(this).parents('.mod-inner').find('.containers').hide(); $(this).parents('.mod-inner').find('#'+ t + 'C').fadeIn('slow'); } }); }); <!-- HTML --> Intro Opinion Chapter </div> <!-- css --> <style> .tabs … Continue reading How to use modal popup with tabs