Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery $(document).ready and ASP.NET MVC Partial

I have quite a few partials in my application, and some of them need to do some jQuery goodness at $(document).ready time.

The problem is, if I put the $(document).ready directly into a script block for the partial, then this gets overridden if another partial does the same thing.

It seems a solution where the various $(document).ready tidbits are gathered up and then included in a single $(document).ready instance is needed.

Is there a defined way to do this already?

like image 693
user40097 Avatar asked Nov 23 '08 17:11

user40097


1 Answers

well, just plain old never mind!

http://www.learningjquery.com/2006/09/multiple-document-ready

like image 63
user40097 Avatar answered Oct 22 '22 12:10

user40097