It depends on what's inside newcontent.html and what you want to do
with it. What liveQuery does, more or less, is keep track of any new
elements that match selectors for things added to its "queue" and
update them on the fly. For example, if you were planning to add new
links with class, "new_pie" you'd do this:

$(document).ready(function(){
          $('.new_pie').liveQuery('click, function(event) {
                $('#orange').load('newcontent.html')
                return false;
       });
});

But it's something inside new_content.html that you're concered with.
Without seeing an example I can't really suggest anything except this
rough example:

$(document).ready(function(){
          $('#orange #some_selector').liveQuery('click, function(event) {
                doSomething();
                return false;
       });
});

AFAIK, '#orange #some_selector' doesn't need to resolve to anything at
the time liveQuery is called.


On Tue, Dec 9, 2008 at 10:29 AM, slandry <[EMAIL PROTECTED]> wrote:
>
> I'm trying to load new contnet using the .load function in JQuery
> which works fine but the new content isn't being update with some
> javascript which should re-render the HTML into an image (sparklines)
>
>    $(document).ready(function(){
>                $('.new_pie').click(function() {
>                        $('#orange').load('newcontent.html')
>            return false;
>        });
> });
>
> Here is a link to the problem
> URL:
> http://seanlandry.com/sparklines/
>
> Some user groups have suggested using LiveQuery, which I've loaded
> into the directory as well. But for the life of me I can't figure out
> how to use it to bind the events. Any suggestions?
>
> Thanks!
>

Reply via email to