I have single.php file in my theme folder and i am using ajax code in this file i have another file in same folder where i am fetching this request but its not working for me here is my jquery written in single.php
$na= jQuery.noConflict();
$na(document).ready(function(){
$na('nav a').click(function(){
var nv=$na(this).text().replace(/s/g, "_");
var pv=nv.toLowerCase();
$na.ajax({
type: "POST",
url: '<?php bloginfo('template_url')?>/popupdatapdf.php',
data: 'valueMin='+pv,
success: function(result){
alert(result);
}
});
});
Try something like this:
And open the console to check for errors, also in the network tab to see that the file
popupdatapdf.php
is actually found in the root of the current theme.