www.webdeveloper.com
Results 1 to 5 of 5

Thread: code not working with Jquery 5.1

  1. #1
    Join Date
    Dec 2009
    Posts
    92

    code not working with Jquery 5.1

    Hi all,

    I have a script over here: JsBin demo

    I need it to function with Jquery 1.5 and up, but for some reason it only works with 4.4 and below. I have no idea what the problem might be. My logic tells me that it should work 'even better' going up the ladder rather than down. I really need to know what the problem is. Help is appreciated.
    Last edited by yomoore; 02-07-2012 at 10:16 AM. Reason: spelling

  2. #2
    Join Date
    Dec 2005
    Posts
    2,984
    jQuery 1.5 underwent a major revision of ajax methods (http://api.jquery.com/category/version/1.5/)

    In any case, comment out the timeout property (or set it to something like 200 or greater) on your ajax requests and it works fine in the newest version of jQuery
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...
    awesome.

  3. #3
    Join Date
    Dec 2009
    Posts
    92
    @aj_nsc Hi Thanks for your help, you're right, it works now I was wondering how you located the problem. Is it common knowledge (reading up on things) or is there some nifty trick I can use next time I run in to problems. I would like to know for future reference.

  4. #4
    Join Date
    Dec 2005
    Posts
    2,984
    Step 1, Look at the result of the code as is.
    Step 2. Load up the newest jQuery library
    Step 3. Go through the code in order of functions fired and add a console.log() in each one. and reload. The first console.log() that isn't fired, you know that's the function that isn't getting called.

    For me, it turned out to be the ajax success function, so I took a look at the $.ajax request and just started commenting out things and, fortunately enough, commenting out the timeout line caused it to work.
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...
    awesome.

  5. #5
    Join Date
    Dec 2009
    Posts
    92
    @aj_nsc

    Thank you very much, I hope this will make things easy in the future.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •  
HTML5 Development Center



Recent Articles