Github repo
-
Is there a github repo I could make a pull request to?
In order to get AJAX working properly, I made changes to the wpfp.js file
`
jQuery(document).ready( function($) {
$( document ).on( ‘click’, ‘.wpfp-link’, function() {
var dhis = $(this);
wpfp_do_js( dhis, 1 );
// for favorite post listing page
if (dhis.hasClass(‘remove-parent’)) {
dhis.parent(“li”).fadeOut();
}
return false;
});
});function wpfp_do_js( dhis, doAjax ) {
var loadingImg = dhis.prev();
loadingImg.removeClass(‘wpfp-hide’);
var beforeImg = dhis.prev().prev();
beforeImg.addClass(‘wpfp-hide’);
var url = document.location.href.split(‘#’)[0];
var params = dhis.attr(‘href’).replace(‘?’, ”) + ‘&ajax=1’;var WidgetRefresh = function () {
$(“.wpfp-span”).parent().load(location.href+” .wpfp-span:first”,””);
};if ( doAjax ) {
jQuery.get(url, params, function(data) {
dhis.parent().html(data);
if(typeof wpfp_after_ajax == ‘function’) {
wpfp_after_ajax( dhis ); // use this like a wp action.
}beforeImg.removeClass(‘wpfp-hide’);
WidgetRefresh();
}
);}
}
`
The topic ‘Github repo’ is closed to new replies.