So, I'm loading some data from a MVC3 action that returns Json, containing some parameters and content as a string. I append the content to some div. In the partial view I have a document.ready JQuery event. For some reason that function executes before the content is appended and all the selectors I declare in the ready function are empty.
Is there a logic reason for this? Is I set a timeout the selectors see the elements. But a timeout can be very imprecise.
Any suggestions?
Thanks!
Example code fiddle: http://jsfiddle.net/aKxy7/