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). It runs perfectly fine w开发者_运维技巧hen 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.
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.
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. 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.
精彩评论