I’m planning to use jQuery autocomplete combo in theme. Loaded script files as follow in header.php
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
When I try it I got javascript error as Uncaught TypeError: $.widget is not a function. This is jquery ui autocomplete demo and I try it at JSFiddle also worked as demo. That’s JSFiddle working demo. I got $.widget error When I add it in wordpress theme. How can I fix it
you need to call jquery ui widget in theme’s functions.php
if anyone is still getting this error I solved this error by installing this plugin for wordpress.
https://wordpress.org/plugins/jquery-ui-widgets/