Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems load slider() conflict jquery-ui.js #443

Closed
rubenscd opened this issue Sep 10, 2015 · 8 comments
Closed

problems load slider() conflict jquery-ui.js #443

rubenscd opened this issue Sep 10, 2015 · 8 comments

Comments

@rubenscd
Copy link

slider() don't load with jquery-ui latest version

example with 5.1.0 bootstrap-slider version http://jsfiddle.net/4nw35fue/
I'm sorry, I could not locate a cdn with version 5.1.1 to test tb.

@seiyria
Copy link
Owner

seiyria commented Sep 10, 2015

You did not load bootstrap-slider at all. You can try to use http://rawgit.com/ if that's your hold up, but as is, the jsfiddle isn't showing anything.

@rubenscd
Copy link
Author

I'm trying http://jsfiddle.net/rubenscd/4nw35fue/1/ (with branch master) don't work.

@seiyria
Copy link
Owner

seiyria commented Sep 10, 2015

That's because it's probably cached. You have to link to a specific commit. Also, why are you using jQuery UI anyway? See #442.

@rubenscd
Copy link
Author

have tried the bootstrapSlider() today, without caching, worked perfectly, thank you.

@seiyria
Copy link
Owner

seiyria commented Sep 11, 2015

Sounds good to me.

@tlartaud
Copy link

tlartaud commented May 18, 2016

@seiyria Sounds not good to me.
You have to bind the alias bootstrapSlider in any case, even if the slider function is undefined. Your actual solution doesn't work at all if jQuery-ui-slider is loaded after your script. This line of code is just binding the alias if the slider function already exist. If your script is loaded before ui slider, this one will simply override your .slider() function, without checking if it already exists or not.

Jquery-ui-slider is almost loaded by default by wordpress on the admin side. For some reasons, developpers often need others libs than jquery-ui, even if the features are almost the same. The problem is that we can't dequeue ui-slider because it's often loade by others plugins and so on ...

So, calling .slider() initiate jquery-ui slider instead of yours, calling .bootstrapSlider() return an undefined function. It's quite not good for you because a lot of users would abandon your script to switch to another solution, for a reported problem since a so long time, and still unfixed (#132).

Hope that can help you.

Best regards.

@tlartaud
Copy link

tlartaud commented Jul 14, 2016

@seiyria said

I still think it's quite simple: don't use two slider libraries.

Really stupid mind. When you are developping an app using dependencies, and sub-dependencies, both libs can be loaded by different libs/plugins/authors.
I've never seen someone yet saying : "my lib is conflicting with another one ? It's your fault, use only my lib, not the other one !" This is so hilarous. You should be the only one who makes app created 100% by yourself, for sure ..

@seiyria said

I don't quite appreciate the snide remarks, as I've mostly held off commenting further in this issue.

Oh yeah ? what did you comment about my issues since I came here ? Nothing, except "hey! give me a PR". So, I don't care that you do not appreciate my snide remarks, a kid like you just deserve them.

@seiyria
Copy link
Owner

seiyria commented Jul 14, 2016

The other thread was locked for a reason. This one will now be too.

Repository owner locked and limited conversation to collaborators Jul 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants