I am using slimbox (http://www.digitalia.be/software/slimbox) a very popular lightweight lightbox for jQUery.
I have used it alot in the past, however now I am a little bit stuck. I had a form that is loading via AJAX, and therefore I need to use the .on()
function to activate slimbox.
But I cannot get it work. I looked at the slimbox code and it doesnt make alot of sense to me. I tried this in my :
$("#content.settings").on("click","div.scroll a.slimbox", function (e) {
e.preventDefault();
$(this).slimbox();
});
And that works, but only on the second click, for some reason it takes two clicks on the same object to function. Any ideas?