I have an action that summarizes an entity's information. The view for the action contains a script to handle the summary's UI. I also have another action that loads this view multiple times (to summarize multiple entity instances). It seems that the jQuery document.ready function fires each time the action's view is loaded on the page. Is that correct behavior?
For example:
I have a SummaryController.Summarize(Entity item) action which has the script to do all the fancy UI stuff. I also have a JobController.Index() action that passes 5 Entity instances to it's view. The view calls RenderAction("Summarize", "Summary", entity) to display each entity. However, I'm expecting the document.ready function to only fire once all of the Summarize actions have loaded (to link up events) but it fires each time, so my events are subscribed to multiple times. Hope that makes sense.