jQuery的$(文件)。就绪和ASP.NET MVC部分 [英] jQuery $(document).ready and ASP.NET MVC Partial

查看:85
本文介绍了jQuery的$(文件)。就绪和ASP.NET MVC部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序相当多的泛音,其中一些需要$(文件)。就绪时间做一些jQuery的善良。

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?

推荐答案

很好,只是普通的老没关系!

well, just plain old never mind!

<一个href=\"http://www.learningjquery.com/2006/09/multiple-document-ready\">http://www.learningjquery.com/2006/09/multiple-document-ready

这篇关于jQuery的$(文件)。就绪和ASP.NET MVC部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆