I have been trying to use Infinite Scroll with Masonry on Wordpress and I can't change the loader.gif.
I'm getting a 404 error in firebug.
I am using register script for the template path in functions.php
wp_register_script( 'image-folder', 'myscript_url' );
wp_enqueue_script( 'image-folder' );
$translation_array = array( 'templateUrl' => get_stylesheet_directory_uri() );
This is what I have in my js file:
var templateUrl = object_name.templateUrl;
loading: {
finishedMsg: $('<div class="finmsg">No More Posts.</div>'),
msgText: 'Loading More Posts',
img: " url'"+templateUrl+"/images/loader.gif' "
},
I have the correct path, but the problem is it keeps adding the image path onto the website url for the current page i.e.
http://mysite.co.uk/news-events/http:/mysite.co.uk/im/wp-content/themes/mytheme/images/loader.gif"