[jQuery] Re: jQuery in loaded content doesn't work

2009-09-24 Thread Dave Maharaj :: WidePixels.com

I ran into the same thing. I have the apple style slider that is on a page
that gets loaded into a div as content. And it no longer works. I would be
interested in following this post to see if any headway is made in this
particular topic.

Dave 

-Original Message-
From: mstone42 [mailto:si...@rocketmail.com] 
Sent: September-24-09 11:46 AM
To: jQuery (English)
Subject: [jQuery] Re: jQuery in loaded content doesn't work


Thanks, Chris!  I'll give livequery a try.



[jQuery] Re: jQuery in loaded content doesn't work

2009-09-24 Thread mstone42

Thanks, Chris!  I'll give livequery a try.


[jQuery] Re: jQuery in loaded content doesn't work

2009-09-23 Thread Matt Quackenbush
My bad.  I must admit that I did not read through the entire post, and also
did not realize that the livequery plugin offered additional functionality.
I was under the impression that it had been fully included into the core
with live().  However, I have been corrected a couple of times after making
this post.  :-)


[jQuery] Re: jQuery in loaded content doesn't work

2009-09-23 Thread morris...@ingenious.org

Matt,

Because he is not just binding events, but doing other things i would
highly recommend the livequery plugin.

Chris

On Sep 23, 5:49 pm, Matt Quackenbush  wrote:
> If you're using jQuery 1.3.x (and you should be), there's no need for the
> livequery plugin.
>
> http://docs.jquery.com/Events/live


[jQuery] Re: jQuery in loaded content doesn't work

2009-09-23 Thread Matt Quackenbush
If you're using jQuery 1.3.x (and you should be), there's no need for the
livequery plugin.

http://docs.jquery.com/Events/live


[jQuery] Re: jQuery in loaded content doesn't work

2009-09-23 Thread morris...@ingenious.org

Mitch,

Try this plug-in.

http://plugins.jquery.com/project/livequery

Chris

On Sep 23, 3:00 pm, mstone42  wrote:
> I am trying to convert a website currently implemented in PHP with
> server-side includes, to not use only Javascript (and jQuery & AJAX).
> The main navigation page has a list of links.  Clicking on a link
> pulls in dynamic content and populates a div on the page.  I am
> using .live() and .load() to implement:
>
> 
> $(function() {
>       $("li.link").live("click", function(){
>       // grab the id from the LI element
>       var linkid = $(this).attr('id');
>       // the html page to pull in
>       var linkpg = 'content_'+linkid+'.htm';
>       // populate the div
>       $("#dynamic_content").load(linkpg);});
>
> 
> ...
> 
>       Sample 1
>       Sample 2
>       Sample 3
> 
> 
>
> The content is getting pulled in and displays, but if the content
> contains elements that trigger jQuery functionality (e.g. other click
> events, or text formatting based on other parameters), it doesn't
> work.  I know this is a binding issue, and if it were just one or two
> events, I'd use trigger() after the load().  But to complicate
> matters, the dynamic content covers a wide variety of events as well
> as manipulations.
>
> I've placed all my jQuery code into a single file, and tried pulling
> in that file via AJAX after the load():
>       $.ajax({type:"GET", url:"./inc_jquery.js", dataType:"script"});
> This works with limited success, but not all events are firing, and
> most specifically the non-event stuff.
>
> Is there some way to cover all the variations?  Without resorting to
> using a frameset?!?
>
> Thanks,
> Mitch