Reputation: 330
I am trying to use jQuery ptTimeSelect plugin http://pttimeselect.sourceforge.net/example/index.html. Here is code from .aspx
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/themes/redmond/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="jquery.ptTimeSelect.css" />
<script type="text/javascript" src="jquery.ptTimeSelect.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#<%= txtTime.ClientID %>").ptTimeSelect();
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<fieldset>
<legend>TEXT</legend>
<h2>Heading</h2>
<ol>
<li>
<asp:Label AssociatedControlID="txtTime" runat="server">Time</asp:Label>
<asp:TextBox ID="txtTime" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtTime" CssClass="field-validation-error" ErrorMessage="Required"></asp:RequiredFieldValidator>
</li>
</ol>
</fieldset>
</asp:Content>
Both .js and .css files linked/included in application. I am using VS2012. I tried to include .js and .css in Site.Master but this plugin is not working. I have other JQuery plugins, they working fine.
I tried every option I found.Any hint where I am making mistake?
Upvotes: 1
Views: 1035
Reputation: 330
I don't have expertise in jQuery/javascript, so I was unaware of using browser console. That's why I wasn't able to found either jQuery files are loaded or not. After I know about browser console I found files are not loaded because of incorrect path, I corrected path and its working now. Thanks to browser console:) Thanks to all who suggested possible solutions
Upvotes: 1