Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Conflicting JQuerys

    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

  • #2
    Gütkodierer
    Join Date
    Apr 2009
    Posts
    2,127
    Thanks
    1
    Thanked 426 Times in 424 Posts
    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.

  • Users who have thanked venegal for this post:

    Bnewton (02-02-2011)

  • #3
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •