Ticket #4168 (closed bug: wontfix)
Event name collision with mootools
| Reported by: | ntoniazzi | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.11.0 |
| Component: | ui.slider | Version: | 1.6rc6 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
When integrating jquery+ui (in noConflict mode) with mootools (not a choice), both libraries answer to the "slide" event, and unfortunately, mootools shoots first.
- Mootools: Fx.Slide, "slide" method
- jQuery-ui: ui.slider, "slide" callback
Shouldn't namespaced events prevent this kind of collision? By adding 'ui' or 'jquery-ui' somewhere?
Change History
comment:3 Changed 4 years ago by ntoniazzi
A workaround is to remove any previous "slide" method before calling the plugin :
jQuery('div.slider').removeAttr('slide').slider({...});
But it's only a workaround.
comment:4 Changed 2 years ago by amsys
confirming this problem, the workaround resolved the issue for me, thanks
comment:5 Changed 22 months ago by dostrog
Until ticket is opened, I've change name 'slide' in lib. Some details in my answer on stackoverflow:
http://stackoverflow.com/questions/4024102/jquery-ui-slider-moving-upwards-and-disappearing-in-the-div-when-used/6778076#6778076
It's work on my joomla 1.6 based site with mootools and jquery-ui enabled
comment:6 Changed 17 months ago by cameronbot
The workaround in commet 3 by ntoniazzi did not work for me, however I found this answer on stackoverflow with another workaround which worked: http://stackoverflow.com/a/7697597
jQuery('div.slider')[0].slide = null;
jQuery('div.slider').slider({...});
comment:8 Changed 7 months ago by tj.vantoll
- Status changed from new to open
We are planning on switching to firing "widget:event" (for example "slider.slide") to avoid naming collisions with native events.
In the meantime you can switch the prefix the slider plugin uses as a workaround - http://jsfiddle.net/tj_vantoll/4uXbk/.

