I just wanted to use on thickbox file for several environments(the same file available under several urls), but I noticed that I have to set the loadingAnimation-image-url statically, so I thought let’s change that and I made a patch, so that you just only need to set the variable TB_LoadingAnimation to the position of the image. I does not matter if you set it before or after loading thickbox.js. Here’s the code which I added on top of the thickbox.js file, it checks whether the variable is already set and if not sets it to the default.
// set the location of the animation shown
// while loading the content of a Thickbox
if(TB_LoadingAnimation === undefined) {
var TB_LoadingAnimation = "images/loadingAnimation.gif";
}
Later in the thickbox.js I replaced the image url with the TB_LoadingAnimation variable. For those who want to use it, here I have for you:
technorati tags:javascript, patch, thickbox, TB_LoadingAnimation, jquery
Blogged with Flock
I'm a computer science student at the Karlsruhe
Institute of Technology. In my spare time I create some nice pieces of
software (mostly for the web), enjoy tuning some of my websites or volunteer
in a fantastic youth organisation.
Read more about me or
my projects.
Leave a reply