Can`t figure out how to call the gif image with a full url (for example: http:// urltoimage .com/test.gif) instead of the stylsheet directory url (obj_test.stylesheet_directory_uri + '/img/ajax-loader.gif').
Any help would be greatly appreciated.
The current code in my custom.js file:
//infinite scroll
if ($masonry.length && obj_test.infinitescroll != 'disable') {
nextSelector = obj_test.nextselector;
if (document.URL.indexOf('/source/') != -1) {
nextSelector = '#navigation #navigation-next a';
}
$masonry.infinitescroll({
navSelector : '#navigation',
nextSelector : nextSelector,
itemSelector : '.thumb',
prefill: true,
bufferPx : 500,
loading: {
msgText: '',
finishedMsg: obj_test.__allitemsloaded,
img: obj_test.stylesheet_directory_uri + '/img/ajax-loader.gif',
finished: function() {}
}
}, function(newElements) {
if ($('.check-text01').css('float') == 'left') {
var $newElems = $(newElements).hide();
$newElems.imagesLoaded(function() {
$('#infscr-loading').fadeOut('normal');
$newElems.show();
$masonry.masonry('appended', $newElems, true);
});
} else {
var $newElems = $(newElements);
$('#infscr-loading').fadeOut('normal');
$masonry.masonry('appended', $newElems, true);
}
});
}
Unfortunatly my skills are not enough to solve this problem. I researched (googled) and so on - no luck.
obj_test.stylesheet_directory_uri + '/img/ajax-loader.gif'giving a dynamic and working path to the GIF anyway?ajax-loader.giftoimg/dir, asobj_test.stylesheet_directory_uriprobably points toget_stylesheet_directory_uri()returnimg: 'https://computerobz.files.wordpress.com/2013/08/when-im-told-that-my-code-is-broken-in-production.gif'in theloadingobject? did you try such thing?