On Thu, Feb 9, 2012 at 3:54 PM, Jack Moore <j
...@colorpowered.com> wrote:
> > I realize that colorbox is not being applied to the newly loaded images
> but i dont know how to fix it.
> This is correct, and your original code should have been very close to
> what you needed. You just need to assign colorbox again once you have
> loaded the new elements into your document. That means this:
> $container.load($(this).attr('href') + ' ' + containerId);
> Would become this:
> $container.load($(this).attr('href') + ' ' + containerId, function(){
> $(".landmark").colorbox({rel:'landmark'});
> });
> On Thu, Feb 9, 2012 at 7:27 AM, Moclvland <maurice.ruel...@gmail.com>
> wrote:
> > Well I got it to work but I'm not sure why it does. And I'm sure its not
> > the proper way to do it. But I thought I'd post it for others that
> might be
> > having the same problem. I was looking at shadowbox, thickbox, lightbox
> and
> > others and it seems people are always having trouble with this issue.
> > I added the code (below) just above the code I originally had. I had to
> > create an empty function for it to stop throwing errors, but it seems to
> be
> > working fine
> > $('#myGallery').click(function(e){
> > function fn() {
> > };
> > if( $(e.target).is('a') )
> > fn.call(e.target,e);
> > $(".landmark").colorbox({rel:'landmark'});
> > });
> > Can anyone tell me why this works or how to improve it?
> > Thanks.
> > --
> > You received this message because you are subscribed to the Google Groups
> > "ColorBox" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/colorbox/-/CPLA6cFiCcAJ.
> > To post to this group, send email to colorbox@googlegroups.com.
> > To unsubscribe from this group, send email to
> > colorbox+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/colorbox?hl=en.
> --
> Jack Moore
> jacklmoore.com
> twitter.com/jacklmoore
> --
> You received this message because you are subscribed to the Google Groups
> "ColorBox" group.
> To post to this group, send email to colorbox@googlegroups.com.
> To unsubscribe from this group, send email to
> colorbox+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/colorbox?hl=en.