code not working with Jquery 5.1
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 11:16 AM.
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
@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.
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.
Thank you very much, I hope this will make things easy in the future.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread