Jump to content

AJAX and jQuery - problem using .live


longtone

Recommended Posts

Using jQuery and AJAX, I am filling a div ' #pic_frame ', by calling a js function 'picShow()'

 

picShow first resizes and hides some images, then it calls a function 'append()' which appends some divs with overlay images, then it sets an Interval on a function 'slideshow()'

 

On first loading the page this all works, but on reloading '#pic_frame' with AJAX, everything works except 'append()'

 

I know .live is probably the answer, I just can't see how to use it

 

I've tried:

$("#pic_frame").live('load', function(){
   append();
});

 

but no joy

 

does anyone know how I get this to work?

 

the thing that confuses me is why setInterval works, but not simply calling a function

 

Link to comment
https://forums.phpfreaks.com/topic/200123-ajax-and-jquery-problem-using-live/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.