need to override function in jquery.ui.datepicker.js

I haven’t tested this, but this should work and don’t forget to replace the jQuery selector with your own: $(function() { if(typeof jQuery.datepicker === ‘function’){ $( “.your_date_picker_field_selector” ).datepicker({ beforeShowDay: function (t) { var e = t.getDay(); return [e == 3, “”] } }); } }); Updated: Since, you are using contact form 7 datepicker addon, … Read more

WP AJAX API with JS file

Currently I’m assuming that is is backend (front end is slightly different), but it’s very easy to implement on the frontend if required. You are correct in thinking that because you haven’t used the WordPress admin-ajax.php file, all the goodness of WordPress is missing. Fortunately this is easily fixed. Before continuing I recommend that you … Read more

Search query with Ajax

This is a javascript issue. You have to prevent form submission to stop the page from reloading. See event.preventDefault() in jQuery docs. jQuery(“#Submityourskill”).click(function(event){ event.preventDefault(); // the rest of your code });

WordPress Insert not working with ajax

Your AJAX callback method should be outputting something followed by a die() statement. function wp_insert() { ..your code echo $whatever_your_results_are; // die(); } I would also recommend against prefixing your custom methods with wp_. That should be reserved for WordPress and will cause confusion to other developers – and probably you 6 months down the … Read more

click event to unhide something after ajax not firing

Your button was added dynamically. So you can not bind event in simple way. As button is added after DOM is fully ready. You need to bind it with the refrence of document or body jQuery(document).on(‘click’, ‘#readmore’, function(e){ e.preventDefault(); alert(“you clicked the button”); jQuery(“#bodytext”).css(“display”, “block”); }); Read more about it here

Ajax call through admin-ajax.php returns 404 error

success and error are functions, not properties of AJAX function. Working code: $(“.tabs .btn”).click(function(e) { e.preventDefault(); $.ajax({ url:”/wp-admin/admin-ajax.php”, type: “GET”, dataType: “html”, cache: false, data: { action: “shows” } }) .success(function(resp) { $(“.ajax-show”).append(resp); }) .error(function(xhr, status, error) { var err = JSON.parse(xhr.responseText); console.log(err); }); }); Also that should be noted: Deprecation Notice: The jqXHR.success(), jqXHR.error(), … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)