So, I have the following js:
function RHP_AJAX(a, b, c)
{
jQuery.ajax({
type : 'POST',
url : custom.ajax_url,
data : { 'action': a , id: b},
success : function(data){
c;
return false;
}
});
}
Then another var:
jQuery(document).on( 'click', '.show', function(e) {
var c = jQuery('.extra').html(data);
RHP_AJAX('ajax', id, c);
});
The issue is .html(data); as data is not yet defined. I know the issue but I am not sure how to describe it (I am sure you guys will understand when you see the code).
How do I address the issue?