Open govindrai opened 8 years ago
Hi @govindrai, I'm sorry you had problems setting up the plugin.
jQuery UI should be optional. Here is a demo that works using just the CSS and JavaScript from the plugin: http://jsfiddle.net/wvega/Cas6T/embedded/result,js,html,css,resources/.
What were the problems you had before including jQuery UI in your project?
Hi @wvega, thank's for your speedy reply. You're correct about JQuery UI being optional. Maybe it was some other error in my code. However, it wasn't clear to me that I also need jQuery for the plugin to work (yes I am a noob). However, at the end of the day, and this is just my suggestion, clarification is never bad. :)
To use jQuery Timepicker you'll need to include two files: jquery.timepicker.min.js and jquery.timepicker.min.css. Then, assuming you have jQuery 2.X and have an element in your document, with class timepicker, you can use the code on the right (or the code below, if you are reading on mobile) to initialize the plugin.
Also I was reusing your plugin today and encountered errors with jQuery 3.X, hence the "jQuery 2.X" in the suggestion above.
Although this seems very amatuer (and I am), I didn't know you needed both JQuery and JQueryUI for the plugin to work, I wasted a solid 45 minutes trying to figure out what the issue was. On your website you mention:
It would be awesome if you added or modified sentence i.e., To use...you'll need to include the two files... as well as JQuery and JQueryUI.
I think this will help noobs save headaches (I for one had JQuery in my file but was missing JQuery UI so it would have been very helpful to know!)
Thanks!