Is jQuery UI a core script or not?

Hi there,

Is jQuery UI a core script or does Yii ships only with jQuery on-board, and jQuery UI has to be published manually?

I made a very simple animation effect, that comes from base jQuery library:


delay(900).slideDown(900)

And it works like a charm. Then I tried to change it to effect bundled with jQuery UI library:


delay(900).show('drop', {}, 900)

And that failed with console error saying "jQuery.easing[specialEasing || defaultEasing] is not a function - in: http://localhost/app/assets/a14360c3/jquery.js - line: 5854".

I’m asking, because I was surprised that error was bind not to my code and the line where I execute this effect, but to some line deep in jQuery core, which is confusing me a bit (I’m not to good in jQuery - to be honest I’m less then average in this stuff).

Second question: is there an easy way to publish (or force publishing as core script, if jQuery UI is a core script, being auto-published) only a piece of jQuery UI being responsible for the effects? To not overload client (browser) with lots of unnecessary code, if I’m not using any jQuery UI widgets, only its effects library?

Or the only option here is to block publishing of core jQuery UI on-board Yii, prepare and download custom release of jQuery UI library, containing only effects and necessary supporting code and publish it along with application, like with any ordinary JS script.

Hi again

The first error is normal that it shows up like that because it will show the line where it was tried to execute, in this case, inside jQuery

as for the 2nd one


Yii::app()->clientScript->registerCoreScript('jquery.ui');

will load the jQuery ui

There’s no separated ‘events’ only ui file, but you can download and include it youself

I rather to load only once jui in my applications, than load a lot of small files, because it will be cached the first visit and loaded only once, 1 request ,but that is up to you

Cheers

Man, works like a dream! :] Thousand thanks and +1 of course! :]

About the default jQuery-UI from registerCore, how do you set the CSS theme that goes with it?

And how do you replace with the latest version?