Results 1 to 5 of 5

Thread: jscript version question

  1. #1
    Join Date
    Nov 2014
    Location
    Hamilton, Ontario
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question jscript version question

    First, I apologize if this question seems naïve. It's my first post and I'm pretty new at this stuff

    I use a number of scripts that call different versions of jquery.min.js
    Some are from http://ajax.googleapis.com/ajax/libs/jquery/1.8/
    and some are from https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js

    My question is, does it matter what version I use? Can I just load the latest version and expect the code to work in other scripts?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    No, you can't just expect it to work. But it might. If the code works with 1.7.2 and 1.8 - it will almost certainly work with only 1.8. But there could be other issues than just working with the particular jQuery version. Some scripts that use jQuery put it into noConflict mode. If one or more of the scripts does this and one or more of them aren't written to operate in this manner, just that can cause a problem (usually easy to fix by removing all calls to jQuery.noConflict() which will work as long as you don't also use other libraries like Prototype/Scriptaculous or MooTools).

    You might also be able to do what you propose (just use the latest version of jQuery). But be aware that 2.x no longer supports IE 8 and less, and might not work with scripts written for earlier versions of jQuery. Version 1.11.x is the latest jQuery I know of (1.12.x will probably be out soon if it isn't already) that supports IE 8 and less, but still might have problems with code written for earlier versions of jQuery.

    Scripts usually work best with the jQuery version they were written to work with, but often will work with almost any version, and if not, often with versions close to the one they were written for. Scripts can often be easily updated to a later jQuery version if you know jQuery and/or javascript well.

    There's a good chance that just using 1.8 will work for you, even perhaps just using 1.11. And it is a good idea to use just one version of jQuery if you can.

    If you want more help though, please post a link to the problematic page on the live web so we can take a look at it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ERISCO (12-01-2014)

  4. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    To add to John's answer, this jQuery blog post might be of interest to you too http://blog.jquery.com/2014/10/29/jq...t-generations/
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  5. The Following User Says Thank You to Beverleyh For This Useful Post:

    ERISCO (12-01-2014)

  6. #4
    Join Date
    Nov 2014
    Location
    Hamilton, Ontario
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks very much John. That's a long explanation for something that I thought might be a simple yes or no! I should know better . Currently, I'm having issues with cross browser functionality but I think it's in my page rather than which library I'm using. If I can't resolve it, I'll be sure to drop you a line with a link to the page. I normally do all my developing locally prior to uploading but I have a ton of room on my hosting server so we'll see. More will be revealed!
    -Robb

  7. #5
    Join Date
    Nov 2014
    Location
    Hamilton, Ontario
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks Beverley. That article was very interesting, even for a newbie like myself.
    - Robb

Similar Threads

  1. JScript - 24hrs with leading zero ...
    By pepe_lepew1962 in forum JavaScript
    Replies: 3
    Last Post: 12-06-2012, 06:47 AM
  2. Adding More Options to the PHP/JScript
    By Kage Kazumi in forum PHP
    Replies: 1
    Last Post: 10-13-2012, 01:21 AM
  3. Old version of Fadeshow - a question
    By chasm in forum JavaScript
    Replies: 1
    Last Post: 09-29-2009, 01:34 AM
  4. A JScript action within a form
    By multichild in forum JavaScript
    Replies: 2
    Last Post: 01-04-2007, 11:45 AM
  5. JScript for rollover on pictures?
    By 32jln in forum JavaScript
    Replies: 9
    Last Post: 08-08-2005, 04:58 PM

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
  •