jQuery(…).activeform is not a function in Yii

后端 未结 3 1079
小鲜肉
小鲜肉 2021-01-18 03:27

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 a

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-18 03:50

    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.

提交回复
热议问题