TRENDING TODAY
‘);
}
function fetchSearchData(keyword, categoryID, postType) {
clearTimeout(timeout);
if (keyword !== ”) {
timeout = setTimeout(function () {
showLoader();
var requestData = {
action: ‘data_fetch',
keyword: keyword,
};
if (postType !== null) {
requestData.custom_post_type = postType;
}
if (categoryID !== null) {
requestData.category_id = categoryID;
}
jQuery.ajax({
url: ‘https://coingape.com/wp-admin/admin-ajax.php',
type: ‘post',
data: requestData,
success: function (data) {
if (data.trim() === ”) {
jQuery(‘#datafetch').html(‘
No Result Found
‘);
} else {
jQuery(‘#datafetch').html(data);
}
}
});
}, 300);
} else {
jQuery(‘#datafetch').html(previousHtml);
}
}
function fetchExchanges() {
var exchangeKeyword = jQuery(‘#Exchangekeyword').val().trim();
var customPost = ‘cryptocurrency-exchanges';
fetchSearchData(exchangeKeyword, null, customPost);
}
function topFetch() {
var topKeyword = jQuery(‘#Topkeyword').val().trim();
var categoryID = 15812;
fetchSearchData(topKeyword, categoryID, null);
}
function gamblingFetch() {
var Gamblingkeyword = jQuery(‘#Gamblingkeyword').val().trim();
var categoryID = 17144;
fetchSearchData(Gamblingkeyword, categoryID, null);
}