I need to modify a javascript file which I’m currently using to display images (it’s a standard lightbox JS). This is the part of the script that I need to modify:
settings : function() {
var t = this, s = shutterSettings;
t.imageCount = s.imageCount || 0;
t.msgLoading = s.msgLoading || 'L O A D I N G';
t.msgClose = s.msgClose || 'Click to Close';
},
Basically I need to replace the word ‘LOADING’ in the script with a loading-bar gif. Could someone point me in the right direction (link to a tutorial, manual etc.) on how to do this? I tried to replace the word with an <img> or <div> tag but that didn’t worked.
You need to make this replacement inside the lightbox plugin, not in its settings.
The
msgLoadingis very likely considered to be given as a string and the string received is set as the text of adiv,porspanelement.If you post a link to the lighbox plugin’s js file or tell us the name of the plugin or the site where you downloaded it, maybe I can give you a more precise answer. The fact that it’s a standard lightbox JS is not exactly helpful
[edit]So it seems you are using Shutter Reloaded for NextGEN Gallery
If you look inside the plugin’s js file (here, in your case), you will see that the
innerHTMLis set, so using animgshould work.Try with these settings:
[edit]The code above must be placed inside the HTML file, in the
headsection, NOT the plugin.That means you must replace this part
with