Timepicker error

0

Hello, how about I have a timepicker like this?

<div class = "col-lg-2 col-md-4 col-sm-4 col-xs-12" > 
   <input id="hora" size = "16" type = "text" value = "" />    
       <span class = "add-on" > 
            <i class = "icon-th" > </ i> 
       </ span>  
   </ div>

<script type="text/javascript" src="jquery.timepicker.js"></script>
<script type="text/javascript" src="lib/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="lib/site.js"></script>

 $(function () {
            $('#hora').timepicker();
        });

at the time of executing this I sent the following error timepciker is not function someone can support me Greetings.

asked by sant23 25.10.2017 в 18:59
source

1 answer

0

I think the only thing you need is to load jquery before the rest, because the following example works for me.

<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">


<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class = "col-lg-2 col-md-4 col-sm-4 col-xs-12" > 
   <input id="hora" size = "16" type = "text" value = "" />    
       <span class = "add-on" > 
            <i class = "icon-th" > </i> 
       </span>  
   </div>

<script src="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>


<script>
 $(function () {
            $('#hora').timepicker();
        });
</script>
    
answered by 25.10.2017 в 19:11