According to the docs at jQuery UI Framework, to use a JUI library such as sortable
, the following code is required: JHtml::_('jquery.ui', array('sortable'));
This apparently works fine if jquery.ui.sortable.js
is exists, but there are no equivalent files for other JUI libraries, specifically draggable/droppable.
What is the correct way to use JUI libraries that aren't included with the core J3.x installation?
Solution: With the guidance from @lodder, here are the steps I followed to get the full working JUI library:
- Went to JUI Themeroller and created/downloaded the theme and related files
- Created the folder
component/com_XXX/assets/jquery-ui-1.11.0.custom
to contain the theme and libraries from the downloaded zip. - Added the below code to my component, and "tada"...all the JUI features/functions were available.
(This place wouldn't be the same without Lodder)
JHtml::_('jquery.framework');
JHtml::_('script', JUri::root() . 'components/com_XXX/assets/jquery-ui-1.11.0.custom/jquery-ui.min.js');