<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='js/jquery.timedropper.js'></script>
</head>
<body><input type="text" name="time" id="time" />
<script>
$('#time').timedropper();
</script>
</body>
</html>
I have tried to insert auto time on text field but getting this error
Uncaught TypeError: $(...).timeDropper is not a function
CodePudding user response:
Try below code.
<html>
<head>
<link href="timedropper.css" rel="stylesheet" type="text/css"> // Path as per your style sheet location
</head>
<body>
<input type="text" name="time" id="time" readonly="" />
</body>
<script src="https://code.jquery.com/jquery-1.12.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script src="timedropper.js"></script> // Path as per your script location
<script>
$("#time").timedropper();
</script>
</html>