1

Hello everyone ,

I have ran into issue where my page design worked with jQuery slider plugin like this one

And now the issue is that trying to use jQuery slider seems to cause a conflict.

The later one is never applied and on my dom_id and the jQuery slider plugin seem to be getting applied in my dom_id.

Is there a way to have both of the above slider plugin without causing a conflict between either one of them?

Regards

Alfo
  • 4,801
  • 9
  • 38
  • 51
Ratatouille
  • 1,372
  • 5
  • 23
  • 50

1 Answers1

1

Are you getting an error message (if so, what is it)?

Have you tried changing the order you load the jQuery UI plugin and your other slider plugin?

Sepster
  • 4,800
  • 20
  • 38
  • Welcome to Stack Overflow, in the future there is a great "add comment" link you can click under each question to add comments. – adeneo Aug 18 '12 at 07:09
  • Thanks for the info and welcome! Unfortunately though until I have a rep of 50, I can't add comments to others' posts ;-) But I believe I have actually answered the question, ie changing the order will probably fix the issue. – Sepster Aug 18 '12 at 07:16
  • Actually; i don't think you have. The morron who made the slider plugin named it the exact same thing as the jQuery UI slider so they are both called by doing `$(element).slider();` so it won't work no matter what order the scripts are in, the plugin will have to rewritten with another name. I still upvoted you, as it's a good suggestion! – adeneo Aug 18 '12 at 07:31
  • Thanks! Yes I realised they had the same name... but I expected* that either a) the second definition might override the first (depending on their implementation), or more likely b) the first one to be defined would be defined while the second definition would fail. This is why I didn't explicitly suggest _which_ plugin should be loaded first ;-) I say "expected" because I wasn't really sure without any further detail about an error or what behaviour is actually occurring. – Sepster Aug 18 '12 at 07:38
  • @Sepster sorry I just could not mention all this in question what adeneo has said is right and I also knew that order want make any difference to it – Ratatouille Aug 18 '12 at 13:35
  • @adeneo, Damn this is nightmare, I knew that rewriting the plugin it would help but are you sure there isnt any other way – Ratatouille Aug 18 '12 at 13:39
  • Maybe you somehow can change the name for one of the sliders before the other loads, say you do `$.fn.slider2 = $.fn.slider;` and then use getScript to get the other script etc. – adeneo Aug 18 '12 at 14:40