I trying to implement
bPopup and got it sort of working with this:
code: $(document).ready(function(){
$(".thumb").click(function() {
var thispop = $(this).next(".pop");
thispop.bPopup({
[other stuff]
}
, function(){
[more stuff])
})
});
});
});
".thumb" is a class of thumbnail images, ".pop" is the popup div class, one of which follows each thumb. The "other stuff" in the bPopup function is some custom bPopup parameters, as you probably guessed.
Problem is, I need to open popups from a number of thumbs (which is why I'm using classes rather than ids,
as bPopup intended [turns out it's selector-agnostic]).
My script works on the first instance (only) of .thumb & .pop, then it stops working altogether so when I click on that first .thumb again (after closing the popup), it doesn't re-open. When I built it using ids (one function per), it works reliably, but I'm hoping to avoid this sort of kludge.
EDITED: 4 Apr 2013 13:13 by DSMITHHFX