Hello,

I'm not certain whether this is an issue with jQuery UI or if I'm just using it incorrectly.

I've created a custom module that makes calls to some very simple, custom jQuery animations. It works when I manually call in the jQuery UI library. However, calling the library via jQuery UI does not seem to actually load the library correctly. I'm not sure why. Here's the working custom module code:

//add header files
	drupal_add_js(drupal_get_path('module', 'gwd') . '/jquery-ui-1.7.2.custom.min.js'); //load jquery UI
	drupal_add_js(drupal_get_path('module', 'gwd') . '/functions.js'); //define functions
	drupal_add_js(drupal_get_path('module', 'gwd') . '/load.js'); //call relevant functions

//special front page animation
if (drupal_is_front_page()) {		
	drupal_add_js(drupal_get_path('module', 'gwd') . '/front-load.js');
}

This works fine. However, I'd like to replace the first line with a simple call to jQuery UI rather than manually including it. I've tried this:

//add header files
	jquery_ui_add('effects.slide.js'); //load jQuery UI
	drupal_add_js(drupal_get_path('module', 'gwd') . '/functions.js'); //define functions
	drupal_add_js(drupal_get_path('module', 'gwd') . '/load.js'); //call relevant functions

//special front page animation
if (drupal_is_front_page()) {		
	drupal_add_js(drupal_get_path('module', 'gwd') . '/front-load.js');
}

When including the jQuery UI Library in this way, the animations do not work. There are no errors. When looking the in the page source, I see that the UI core and the Effects core have been added (before the custom module-- I gave a heavier weight to custom module):

<script type="text/javascript" src="/path/to/sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.core.min.js?Z"></script>
<script type="text/javascript" src="/path/to/sites/all/modules/jquery_ui/jquery.ui/ui/minified/effects.core.min.js?Z"></script>
<script type="text/javascript" src="/path/to/sites/all/modules/jquery_ui/jquery.ui/ui/minified/effects.slide.js.min.js?Z"></script>

The jQuery functions only include the slide effect (which should be part of the jQuery core). Is this a bug in jQuery UI? I'm using the module as per the readme.txt instructions. This problem exists across 3 of my sites when trying to use jQuery UI.

I've tried using jQuery 1.2.x and 1.3.x via jQuery update. I've likewise tried jQuery UI 1.6.x and 1.7.x accordingly.

Any help would be appreciated! Thanks!

Comments

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Is this still an issue?

nod_’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Version for Drupal 6 is not supported anymore, closing.