Slick: Conflicts with mootools

Created on 7 Oct 2016  路  10Comments  路  Source: kenwheeler/slick

Running _.$slider.trigger('setPosition', [_]); causes mootools setPosition method to be called (http://mootools.net/core/docs/1.6.0/Element/Element.Dimensions#Element:setPosition)

Just add https://cdnjs.cloudflare.com/ajax/libs/mootools/1.6.0/mootools-core.min.js as a source and run to see the error

More Details

  • Which browsers/versions does it happen on? Chrome
  • Which jQuery/Slick version are you using? 1.6.0
  • Did this work before? before what?
Not A Bug Question / Support

Most helpful comment

I _"solved"_ it by changing the name of the function setPosition in mootools-core.js to setPosition1 (for example) so that it won't conflict with slick/jquery. Of course you have to be sure you're not using that function with mootools...

All 10 comments

My recollection is that $slider.slick('setPosition') is how that works, but it's been a minute since I've used it.

I've just faced same issue.
method unslick

I have the same problem. As soon as you have slick and mootools both loaded the system crashes. Changing the line in slick to $slider.slick('setPosition') does not work.

I have the same issue, how can you solve this?

I could not find any way :(

I _"solved"_ it by changing the name of the function setPosition in mootools-core.js to setPosition1 (for example) so that it won't conflict with slick/jquery. Of course you have to be sure you're not using that function with mootools...

This is not very convenient... :/

I found the same problem in Joomla. @sonosergio changed the name of the setPosition method inside slick on this issue https://github.com/kenwheeler/slick/pull/2191, but I still don麓t understand why mootools triggers

Worked out well for me after changing 'setPosition' to 'setPosition1' in all the places inside slick js file

Is any other solution to solve this problem without hacks one of fw?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NozX18 picture NozX18  路  3Comments

yangkennyk picture yangkennyk  路  3Comments

hoghamburg picture hoghamburg  路  3Comments

msavov picture msavov  路  3Comments

ericestes picture ericestes  路  3Comments