DataTables with jQuery 1.4

DataTables with jQuery 1.4

jayendrankjayendrank Posts: 2Questions: 0Answers: 0
edited January 2010 in General
Does anyone have any issues using DataTables with jQuery 1.4?

Replies

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    Hi jayendrank,

    Anyone who is using DataTables 1.6.0 is likely using it with jQuery 1.4 as it comes with it by default. Passes all my unit tests without any problems, and I've not encountered anything else that could be attributed to switching to jQuery 1.4.

    Regards,
    Allan
  • tidelipoptidelipop Posts: 10Questions: 0Answers: 0
    After upgrading to JQuery 1.4 I get a popup in IE saying Do you want to stop the script, when I access my page with a datatables in it. It works fine in Chrome and Firefox. If I go back to JQuery v1.3.2 it works fine in IE again. Any ideas?
  • tidelipoptidelipop Posts: 10Questions: 0Answers: 0
    After upgrading to JQuery v1.4 I get a popup saying "Do you want to stop the script?" in IE. It works fine in Firefox and Chrome. If I stop it, I can still paginate, but if I try sorting by clicking a column title I get the same popup again. If I go back to JQuery v1.3.2 it all works fine again. Any ideas?

    [code]
    $('#phonebook').dataTable({
    "iDisplayLength": 25,
    "sDom": '<"top"fl<"clear">>rt<"bottom"ip<"clear">',
    "aaSorting": [[5,'asc'], [4,'asc'], [3,'asc'], [1,'asc']]
    });
    [/code]
  • RickFRickF Posts: 9Questions: 0Answers: 0
    tidelipop - I had the same issue with dataTables-1.5.6, but it seems to be resolved in 1.6.
  • tidelipoptidelipop Posts: 10Questions: 0Answers: 0
    edited January 2010
    Hi RickF!

    No, not for me. I use v1.6 of datatables and it makes no difference. The problem is still there for me.

    I should also note that i have a rather large table, it's a phonebook with 894 rows 9 columns and it's in a html table before applying datatables. I think I should try fetching by ajax instead, maybe that's quicker than converting an existing table?
  • jayendrankjayendrank Posts: 2Questions: 0Answers: 0
    We are using the horizontal jquery menu from http://apycom.com/menus/1-deep-sky-blue.html at the top of the datatable and is causing this conflict.

    jQuery 1.4
    dataTables 1.6

    <<<
    Object doesn't support this property or method
    >>>

    [code]
    ...





    $(document).ready(function() {
    $('#preq_smList').dataTable( {
    "sPaginationType": "full_numbers",
    "aoColumns": [
    null,
    { "sType": "html"},
    null,
    { "sType": "date"},
    null,
    { "sType": "date"},
    { "bSortable": false }
    ]
    } );
    } );

    ...
    [/code]
  • RickFRickF Posts: 9Questions: 0Answers: 0
    tidelipop - I'm using ajax and potentially large datasets, although I think I was seeing the problem dialogue box pop up even before results were returned from the ajax queries.
  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    Re: Do you want to stop the script? - ouch - that shouldn't be happening! Unless the table set is really rather large, then DataTables shouldn't be showing that message up (I suppose 1000 records might trigger it under IE in certain circumstances - depends on the complexity and the system). One thing that is worth trying is disabling the sorting class column: bSortClasses. This is probably the heaviest DOM interaction that DataTables has, due to the adding and removing of classes to cells. Another consideration is that sorting can very poor in IE due to the algorithm they use.

    I've noticed a very small decrease in speed when using jQuery 1.4, so it's possible it's the straw that broke the camel's back, but the difference is very small indeed. It should also be faster for adding and removing classes... There are a few optimisations I'd like to try for DataTables when I get a chance, but I don't know about getting gains of x10 in speed - it's already fairly nippy ;-)

    @jayendrank: Could you open a new thread please, I don't think that directly related - or at least it might confuse the matter :-).

    Regards,
    Allan
  • emiliosicemiliosic Posts: 4Questions: 0Answers: 0
    I had the same problem when my tables (HTML) get closer to 1000 records. No problems whatsoever on JQuery 1.3.2.
    Definitely a BIG performance impact on jQuery 1.4
    Under jQuery 1.3.2, I can run a 7000 records table with pagination and JUI with no issues under Safari and Firefox. Under 1.4.0, it crawls with less than 1000 records.
  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    Yup - I'm seeing this as well. Quite disappointing really :-(. This thread - http://datatables.net/forums/comments.php?DiscussionID=1155 - deals with the same subject. I suggest we use that thread primarily now (it's slightly older than this one) for investigation in to this topic.

    Thanks,
    Allan
This discussion has been closed.