Having Multiple Javascript Libraries On One Website

Discussion in 'HTML & Website Design' started by dreamsr4ever, Feb 14, 2013.

  1. #1
    Can I some pages/website functionality running on jQuery and some on Yui? Can we have both these libraries on one website. Is there a way to use these both libraries on same website.
     
    dreamsr4ever, Feb 14, 2013 IP
  2. Hostname.club

    Hostname.club Active Member

    Messages:
    165
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    Digital Goods:
    11
    #2
    You can use all of them inside your pages by pasting the embed script before end of </body> tag.
     
    Hostname.club, Feb 15, 2013 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    My question would be why do you want to? Though honestly, YUI is the only thing I piss on harder than jQuery -- since it's mix of being a HTML, CSS and JS framework results in some of the worst websites from an accessibility standpoint there is.

    Getting web development advice from Yahoo is like getting automotive construction advice from British-Leyland.
     
    deathshadow, Feb 15, 2013 IP
    digitalpoint likes this.
  4. jontetz

    jontetz Greenhorn

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    It is really never a good idea to have two different libraries on your site. You should pick one and stick with it. Having two libraries can cause a lot of code bloat and negatively effect your load times for end users.
     
    jontetz, Feb 17, 2013 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    There, fixed. :D
     
    deathshadow, Feb 17, 2013 IP
  6. Morningwalker

    Morningwalker Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    Technically, if each library properly "namespaces" its functions (and the namespaces don't clash), doesn't declare any global functions, and don't override/augment any native object prototypes, they could live together. In reality, however, there is very likely to be a clash (for instance, many libraries define their own $() function).
    Find the library that best fits your needs and use that one.
     
    Morningwalker, Feb 17, 2013 IP
  7. pinki5

    pinki5 Active Member

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    66
    #7
    yes you can use as many as u like but i try to avoid most of javascript when it comes to IM due to accessibility
     
    pinki5, Feb 18, 2013 IP