jQuery(...).activeform is not a function in Yii
20,373
If you include jQuery core libraries manually in your layout file, it could be possible that jQuery gets loaded a second time and overrides the original jQuery object which had the Yii plugins attached.
You should use Yii::app()->clientScript->registerCoreScript('jquery.ui')
instead.
Author by
hd.
Updated on July 09, 2022Comments
-
hd. almost 2 years
I am developing a project with Yii.
I need to use jquery ui on many pages of site. So I add jquery core library and jquery ui library in the layout of site to have access to them on all the pages.
But it causes problem on the pages which have a form (active form). I see this error on the firebug :
jQuery(...).activeform is not a function
why is it so? How can I resolve it?
Thank you.
-
Tauseef almost 9 yearsWhere should I add this line
-
Michael Härtl almost 9 yearsThe question was about the layout file, so you'd look for some file in
protected/views/layouts
.