[wp-trac] [WordPress Trac] #31111: jQuery UI errors when using bundled UI and Effects
WordPress Trac
noreply at wordpress.org
Fri Jan 23 22:15:10 UTC 2015
#31111: jQuery UI errors when using bundled UI and Effects
-------------------------------+------------------------------
Reporter: awarren | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: ui, javascript
-------------------------------+------------------------------
Comment (by ocean90):
I couldn't reproduce the issue. `jquery-effects-core` includes only the
core functionalty. You've to enqueue each effect you want to use too.
Something like this should work in your plugin:
{{{
$dependencies = array( 'jquery-ui-core', 'jquery-effects-core' );
switch ( $a['animation'] ) {
case 'fade' :
$dependencies[] = 'jquery-effects-fade';
break;
case 'scale' :
$dependencies[] = 'jquery-effects-scale';
// No break because scale needs size too
case 'size' :
$dependencies[] = 'jquery-effects-size';
break;
}
// enqueue custom jQuery and localize the script
wp_enqueue_script( 'aw_simple_sorter_js', plugin_dir_url( __FILE__
) . 'js/aw_simple_sorter.js', $dependencies );
}}}
Can you still reproduce this with the changes above? Is this specific to a
browser?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31111#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list