.js extension and enqueue it from my themes js directory. Now
ajax_url is only available globally in admin section not in front end.
To get the url we have to use
<?php echo admin_url('admin-ajax.php'); ?> for front end Reference.
How can i use it in the file as it is a
js file? Php can not be interpreted.
Is there any other way to define the ajax_url in my js file for front end.
OR should i include it in the header.php with no option?