...

View Full Version : jQuery Conflicting JQuerys



Bnewton
02-02-2011, 03:31 AM
Hey Guys,

I'm not great when it comes to javascript, I normally rely on static XHTML and CSS but for University I'm going to learn JavaScript so I'm starting here, please forgive me if this is a relatively straight forward solution.

I've currently got a website online and I'm trying to make both the header "parallax" jquery and the middle (on the grass) section work as a slider so to speak.

All of the code and the errors can be compared by viewing:

http://www.bnewton.co.uk/
and comparing it to
http://www.bnewton.co.uk/index2.asp

I've played about with recommendations of using no conflict jquery lines, but to no avail. I need a hero please haha :)

Thank you in advance for any help

venegal
02-02-2011, 10:49 AM
I don't really know how those two versions are different or what's the expected behaviour. I can tell you, though, that you *do* have to use jQuery's noConflict method, because you're also loading Prototype.

Which is, btw, not a very good idea. You're loading two different Javascript frameworks just for two little plugins, and still have other bloated code in there that doesn't make use of any of those frameworks and adds to the redundancy.

If you're serious about learning Javascript, just choose one framework (probably jQuery) and try to write the stuff you need yourself. Just mixing and matching plugins, you definitely won't learn much. Looking at all the included script files in your HTML source, one could think that your site does huge amounts of client side stuff but it actually isn't doing much. If you wrote the desired functionality yourself, I'm pretty sure you could do it in less than 100 lines.

Bnewton
02-02-2011, 09:01 PM
venegal;

Thanks for taking the time to reply, I do appreciate it. I'm nowhere near the stage where I could write the code myself, especially in 100 lines or less. Perhaps in the future! :) :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum