ptTimeSelect JQuery TimePicker plugin issue

随声附和 提交于 2019-12-02 10:56:07

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/20114748/pttimeselect-jquery-timepicker-plugin-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!