SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: JS Conflicts

  1. #1
    SitePoint Member
    Join Date
    Mar 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JS Conflicts

    Hello.

    I've ran into a problem, hopefully someone out there on our wonderful earth can maybe help resolve this terrible issue.

    Now, I've recently discovered that moo.js will conflict with prototype.js

    Because of variables / functions / objects with the same names etc.

    My site needs moo.js as it's friends with accordion.js / mootools.js

    [ all in same folder ]

    I've been told I could find a prototype.js that will work with moo.js ?

    Or maybe there is a work around this ?

    Please forgive me, as I'm very new to this

    and a little step by step to help fix this problem would generate big smiles.

    Here's an example of what the code in the head looks like :


    <script type='text/javascript' src='scripts/gallery/js/prototype.js'></script>
    <script type='text/javascript' src='scripts/gallery/js/scriptaculous.js?load=effects'></script>
    <script type='text/javascript' src='scripts/gallery/js/lightview.js'></script>
    <script type='text/javascript' src='scripts/misc/moo.js'></script>

    <link rel="stylesheet" type="text/css" href="scripts/gallery/css/lightview.css" />
    <link rel="stylesheet" type="text/css" href="style.css" />



    Also, if it helps. Here's my website - www.dejonisodd.com

    It doesn't have the same code I added above. For reasons you know already.

    I thought having a look at the source would also help.

    My whole site is on the one html file.

    I also hope this isn't confusing, I tried to explain this as best as my brain will allow.

    Any help / insight will not go to the gutter.

    Thanks.

  2. #2

  3. #3
    SitePoint Member
    Join Date
    Mar 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.

    Looks like I need a prototype alternative.

    Any suggestions ?

  4. #4
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Why can't you just use ONE library? They all do more or less the same thing so having more than one is a bit silly. The big boys seem to be:

    jQuery
    Mootools
    Prototype
    YUI
    Dojo toolkit

    The latter two maybe less so than the first three. However, there are also other less well-known alternatives out there, some of which seem to be very nice to me, such as Robert Nyman's DOM Assistant and Dean Edwards' base2.DOM. These might not be able to give you niceties like accordions, but they're very nice to help you navigate the DOM.

  5. #5
    SitePoint Member
    Join Date
    Mar 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So instead of making lightview call prototype.

    Could I just make it call moo.js ?


Bookmarks

Posting Permissions

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