Thanks for the link. Wasn't 100% what I was looking for, but it did
point me in the right direction..

Appears that .load injects the html that I am calling into the DOM. I
think that makes my function unavailable to my request, once the html
is injected into the DOM.

Looking at this tutorial:
http://docs.jquery.com/Ajax

It appears that .load return jQuery instead of XMLHttpRequest. So the
calls that I'm making from my .load data isn't accessing the functions
that were previously loaded.

I solved my problem by loading the necessary javascript/jquery code
with my .load data, but I'm wondering if there's a better way.

Thanks!
Chris

On Aug 21, 1:21 pm, James <james.gp....@gmail.com> wrote:
> If you are calling your lightbox initialization code before your AJAX
> call, read 
> this:http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
>
> On Aug 21, 6:41 am, gossamermedia <ch...@gossamermedia.com> wrote:
>
>
>
> > I'm not sure I'm asking the question correctly, but if anyone could
> > point me to the correct article or discussion, I'd appreciate it. (or
> > just answer the questions if you are so gracious)
>
> > After loading an html file asynchronously into a div on my webpage, I
> > don't seem to be able to use jQuery within that called data.
>
> > Example: I pull an html snippet into my web page using .load("file/to/
> > load.html"). In that file is an img, that when clicked, (I would like)
> > to open a lightbox.
>
> > This just doesn't work.
>
> > If I put my snippet of html code directly in my web page[don't call it
> > asynchronously] the lightbox works fine.
>
> > TIA,
> > Chris

Reply via email to