Fix “xyz.widget is not a function” when jQuerying in Drupal

The error looks like:

c.widget is not a function

Or:

d.widget is not a function

I get this error when I do theming or module development for Drupal. Basically this tells you that the file jquery.ui.widget.js is missing. check the code you were writting and add that file to Drupal like this:

drupal_add_js('misc/ui/jquery.ui.widget.min.js');

Leave a Reply

Your email address will not be published. Required fields are marked *