inputpicker
inputpicker copied to clipboard
JS error "popover is not a function" with most basic example
I must be missing something, I've double-checked i have the same jquery.inputpicker.js file as on the example site https://www.inputpicker.com/
But running this basic example gives an error within the plugin:
<input id="test" value="Text 2" />
<script>$('#test').inputpicker({data:[ "Text 1", "Text 2", "Text 3" ]});</script>
Error in console is: Uncaught TypeError: $(...).popover is not a function at _initPP (file:///D:/Temp/JqueryStuff/inputpicker/src/jquery.inputpicker.js:696:38)
The line in question is: function _initPP(){ $('[data-toggle="popover"]').popover() }
And looking at the js code, the function popover() does seem to be commented out on line 308???
Any help would be much appreciated, thanks.
Face same error. Please help. I am using Jquery 1.12.4
Hi, popover is used in bootstrap. try loading https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js
Hi, @ukalpa I already loaded bootstrap.min.js but still the issue exist + with another issue when choosing an option which is
Uncaught Error: Please use show on visible elements
at Fe.show (tooltip.js:220:13)
at Fe._enter (tooltip.js:598:15)
at Fe.toggle (tooltip.js:191:17)
at HTMLDivElement.
I fixed the first issue by adding
$(document).ready(function () {
$('#test').inputpicker({data:[ "Text 1", "Text 2", "Text 3" ]});
});
But now how can I fix the second issue which is Uncaught Error: Please use show on visible elements issue?