[jQuery] Extra code for re-instantiating interface:imagebox -- after ajax load methods
I just wanted to post this information,
related to interface>imagebox usage
- it is a really great plugin, btw!
I spent a wee bit of time trying to debug FF issues
- related to loading imagebox html using jquery's ajax methods. Seems
it stalled after first click
- that is when clicking second image of hml loaded via ajax >> the
script stalled. -- subsequent clicks did not load image.......
I perused these and other forums - with no answer.
What I discovered is the need to remove residual imagebox divs
and then re-instantiate Imagebox itself
my problem code for FF was:
function initAjaxImageBox(){
$.ImageBox.init(
{
loaderSRC: 'img/imagebox/loading.gif',
closeHTML: '<img src="img/imagebox/close.gif" / border="0">',
// etc
}
);
}
the solution code is:
function initAjaxImageBox(){
$("#ImageBoxOverlay").remove();
$("#ImageBoxOuterContainer").remove();
$.ImageBox.init(
{
loaderSRC: 'img/imagebox/loading.gif',
closeHTML: '<img src="img/imagebox/close.gif" / border="0">',
// etc
}
);
}
initAjaxImageBox is called within an ajax method (on success)
i hope this helps others
just posting this for general info.....
cheers
(-john-)