Try rearranging it like this:
$(document).ready(function(){
$("#loadformdiv").load("forms.asp?form=2", function() {
$(this).append(
$('.date-picker').datePicker()
);
});
});
You want to use the load callback to trigger your logic. You *could*
use ajaxStop but that is less elegant and you would need to reselect
the target div because "this" is that function is the window object.
Mike
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.