How do i prepend to a div loaded via ajax?
Hello,
As the title says, im having problems trying to prepend data to a div that im reloading with ajax. I understand that because this instance of the element does not exist when the dom loads, i probably can not simply use the prepend call.
With for example, with the click command, instead of:
$('#button').click(function(){ //click function });
i can use:
$('#button').live('click', function(){ //click function });
which lets me bind a click function to an element that has been loaded in with ajax. Is there a similar technique for prepending data to a div that has been loaded in with ajax? Or is there a way to refresh what elements in the dom are visible to my jquery?
Cheers