简体   繁体   English

jQuery datepicker如何在VS2010开发人员模式下工作?

[英]does jquery datepicker work in VS2010 dev mode?

I've got a basic implementation of jquery datepicker in my project (everything straight from the sample project). 我在我的项目中有了jquery datepicker的基本实现(所有直接来自示例项目)。 It runs perfectly fine when I publish to the web server and run it from there, but it doesn't fire at all when I run it in debug mode from Visual Studio 2010. 当我发布到Web服务器并从那里运行它时,它运行得很好,但是当我从Visual Studio 2010的调试模式下运行它时,它根本不会启动。

Has anyone else encountered this or does anyone have any thoughts on why this would be? 有没有其他人遇到过这个问题,或者有人对为什么会这样有任何想法? Is there any way to enable this so I can test it more easily? 有什么方法可以启用此功能,以便我可以更轻松地对其进行测试吗?

I can post source, but I confirmed that it is exactly the same in debug mode as from my build. 我可以发布源代码,但是我确认它在调试模式下与我的构建完全相同。 The only thing I can think of that's different is the web.config but I don't know of any way that should impact this. 我唯一能想到的就是web.config,但我不知道有什么方法会影响它。

Thanks. 谢谢。

Well, a night's sleep sometimes is the cure. 好吧,晚上的睡眠有时可以治愈。 Here was my original header: 这是我的原始标题:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
<script type="text/javascript" src="lightbox/js/prototype.js"></script>
<script type="text/javascript" src="lightbox/js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="lightbox/js/lightbox.js"></script>
<link type="text/css" rel="stylesheet" href="lightbox/css/lightbox.css" media="screen" />
<link type="text/css" rel="Stylesheet" href="Scripts/jquery-ui-1.8.9.custom.css" /> 

I recalled this morning that the pathing sometimes was a problem if I didn't explicitly reference the folder root first so I added "~/" to the local files as such: 我记得今天早晨,如果我没有先明确引用文件夹的根目录,那么有时会出现路径问题,因此我在本地文件中添加了“〜/”,如下所示:

<script type="text/javascript" src="~/lightbox/js/prototype.js"></script>
<script type="text/javascript" src="~/lightbox/js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="~/lightbox/js/lightbox.js"></script>
<link type="text/css" rel="stylesheet" href="~/lightbox/css/lightbox.css" media="screen" />
<link type="text/css" rel="Stylesheet" href="~/Scripts/jquery-ui-1.8.9.custom.css" />   

That did it. 做到了。 I'm not entirely sure why it worked on the server and not dev since both directory trees are the same for these files, but there it is. 我不完全确定为什么它在服务器而不是dev上能工作,因为这两个文件的目录树都相同,但是确实如此。 Probably should have tried that before raising the flag here, but hopefully it will save someone else some time. 在升起国旗之前,可能应该尝试过,但是希望它可以节省其他人的时间。

Thanks, Bob. 谢谢,鲍勃。 Appreciate the comment and possibly you would have seen the problem in the source sooner. 感谢您的评论,您可能会早日在源中看到问题所在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM