Mark Kordahi
Mark Kordahi

Reputation: 67

clockpicker not working after adding updatepanel

so the clockpicker was working just fine until I added the updatepanel, I know that the scripts should be outside the tag but still not working.. here is my code:

<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/highlight.min.js"></script>
<script src="dist/jquery-clockpicker.min.js"></script>
<script type="text/javascript">
 $('.clockpicker').clockpicker();
</script>


<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
    <div id="schedule_div" runat="server" class="jumbotron" visible="false">
        <table style="width: 100%;">
            <tr>
                <td style="width: 509px">
                   <div class="input-group clockpicker" data-placement="left" data-align="top" data-autoclose="true" style="left: 207px; top: 9px; width: 91px; height: 36px">
                   <asp:TextBox ID="TextBox1" class="form-control" value="13:14" Style="left: 5px; top: -20px; width: 202%" runat="server"></asp:TextBox>

                </td>
            </tr>
        </table>
    </div>

    <br />
    <br />
</ContentTemplate>
</asp:UpdatePanel>

Upvotes: 0

Views: 418

Answers (1)

Mark Kordahi
Mark Kordahi

Reputation: 67

fixed by adding below instide contenttemplate

<script type="text/javascript" language="javascript">
            Sys.Application.add_load(jScript);
        </script>

jScript is the function name

Upvotes: 1

Related Questions