Datatables and JQuery 1.5
Datatables and JQuery 1.5
bryceray1121
Posts: 65Questions: 0Answers: 0
If this is already posted, I didn't see it. But, is the current version of Datatables compatible with the newly released JQuery version 1.5?
This discussion has been closed.
Replies
BTW, can anybody tell what are the highlights/changes in 1.5?
Improved Ajax, faster lateral DOM traversal are the big ones to me. The sub() function could prove useful, too; I just don't know how yet. ;-)
@jQuery_user - there is a description of the new features available on the jQuery blog from John Resig: http://blog.jquery.com/
Regards,
Allan
I just did a quick test with datatables 1.7.5 and jQuery 1.5 using the datatable samples that come with the zip package. I've only done this test for the "Ajax source" sample under the "Data sources" title in the Index page and I'm finding that this example fails to show the data.
I'd simply renamed the existing jquery.js file found in the media\js folder to jquery_old.js and put the jquery.1.7.5.js in its place (named jquery.js) and then tried to run that example. It does not load the data from examples_support\json_source.txt into the datatable and says, "No data available in table".
Can you please confirm that this is not something stupid that I'm doing to cause this trouble?
Thanks.
Allan
I'm afraid don't have any means of placing my example online. As I've mentioned before, it is the same examples from your package except for the fact that I've changed the jQuery.js to be jQuery version 1.5. If I use jQuery version 1.4 everything works fine! Please see my reply to GregP below.
GregP,
I did as you suggested. I named the jQuery.js to jQuery.1.5.js and changed the code in the ajax.html to be:
[code]
[/code]
and it still does not work for me. Notice in this screen capture how the "Processing" indicator is still hanging around, http://tinypic.com/r/30vyyrp/7
UPDATE: Chrome shows the "Processing" indicator while IE8 does not. Neither shows the data from the json file.
Allan
I'm a real noob at this stuff so please bear with me while I try to decipher what you are asking. I opened the "ajax.html" file in chrome and had the "Developer Tools" window open too. I selected the "XHR" option in the Resources. As you can see from the following screen captures, there does not appear to be any information displayed.
http://i52.tinypic.com/2i23hx.jpg
http://i55.tinypic.com/vhdnqh.jpg
Please let me know if there is something obvious that I've missed when trying to get you the information that you need. I did this testing with the following version of jQuery:
[code]
[/code]
If I substitute
[code]
[/code]
all is well, so it is obviously something in the jquery version 1.5 that is causing me grief.
I've tried the full version (i.e., non-minified) of jQuery 1.5 to see if that makes a difference but it too fails to render any data.
You're in the right general area of Chrome to capture some other relevant information. Instead of the Resources->XHR section, try the Console section. If it's indeed jQuery 1.5 or DataTables, it's likely a JavaScript error halting the script before the data is even properly requested. The Console should report back JavaScript errors.
Greg
Thanks,
Allan
Thanks for all the previous assistance with this matter.
Mike
Are you sure JQuery 1.5 works fine with DataTable 1.7.5?
i encounter the same problem as describe here:
http://datatables.net/forums/comments.php?DiscussionID=4133&page=1
Regards,
Nicolas
Allan
Here's the jquery 1.5 compatibility fix for the bassistance validation plugin :
https://github.com/bigfix/jquery-validation/commit/9aa53f9241224ba349f9fe1b2c801be0f431b63b#L0L1089
Now it works fine!
[code]
[/code]
That's fine, until I looked at the jquery.js source and it is version 1.4.4. Unless I'm clueless (and that is a possibility) we're not really using jQuery version 1.5.
Alan, would it be possible for you to change that to version 1.5 for me to test?
I think it's safe to say that the production version of DataTables is still shipping with 1.4.4, but those of us who have switched to 1.5 have either changed the path in the script tag, or have dropped the new jQuery in place with the same filename.
Unless I'm misunderstanding you, are you saying that I can change the jQuery.js on the *live URL* that I'd mentioned (http://www.datatables.net/examples/data_sources/ajax.html )? I didn't think so. That's why I'm asking Alan to change it so I can be sure that I'm not screwing up somewhere in my own work. All I'm asking is for an online live demo that proves that datatables's JSON datasource is compatible with jQuery v 1.5. We know it works with jQuery 1.4.4.
I've already switched out the jQuery 1.4.4 to use 1.5 on my local testing computer and reported that it does NOT work for me. Take a look up a few posts to see.
I don't know that updating the live demos to 1.5 will help, though. People are using 1.5, including myself, with no issues. That doesn't mean there AREN'T issues (I doubt you're imagining things), but updating the online demos to use 1.5 won't necessarily give you any satisfaction.
As for updating the online demos to use jQuery v1.5, at least it would determine that my issues are a result of my own ignorance. That, to me, will give me satisfaction :)
Besides, if datatables is truly compatible with jQuery v1.5 (and I have no reason to doubt Alan's claim) what harm would there be in updating the online demos to use it? This way, everyone is on the bleeding edge :)
What I plan to do is include jQuery 1.5 in the next release of DataTables - which will be 1.7.6 (hopefully not too far away!). I'd rather not just randomly change the underlying libraries of any released software (be it DataTables or anything else) as that way lies dependency madness :-). However, it should work without any problems - if there is anything 'funny' it would be good to get to the bottom of it.
@MikeS - if you could give us a link to your page we can take a look and see what might be happening.
Allan