Page 1 of 1

How do you handle JS Conficts?

Posted: Wed Jun 18, 2014 7:24 am
by simonmlewis
We have several <script> tags on our admin page, that do various things.
I'm adding one for the chainlinks of dropbown <Select> options. But with the other scripts, this is being ignored.

I've read somewhere that you can add something to "cancel out" scripts, or something that will stop it conflicting.

How do you do it, and where does it go?

Re: How do you handle JS Conficts?

Posted: Wed Jun 18, 2014 8:40 am
by Celauran
Have you looked at the scripts to determine where/why they're conflicting? I generally try to keep my JS together in one file, and only keep libraries (ie. jQuery, modernizr) in separate files.

Re: How do you handle JS Conficts?

Posted: Wed Jun 18, 2014 10:49 am
by simonmlewis
http://cssdeck.com/labs/css3-image-slider
Is there any way this script, can be made to "auto slide"???
I don't want to use nivo slider, I want this - but can it auto run???

Re: How do you handle JS Conficts?

Posted: Wed Jun 18, 2014 4:20 pm
by simonmlewis
Sorry I don't know what you mean about libraries.
On this particular page, some scripts must be run "locally" while some are in one file.
Nivo Slider is apparently a real sod for causing conflicts.

Re: How do you handle JS Conficts?

Posted: Wed Jun 18, 2014 6:20 pm
by Celauran
The link you posted above is certainly not causing any conflicts; there's no JS. It's all CSS. You could definitely get it to auto-rotate by having a click event trigger based off a timer.