Name Conflict

Name Conflict

soberspsobersp Posts: 28Questions: 0Answers: 0
edited October 2009 in General
I am using jQuery.js and dataTable.jQuery.js which conflicts with protoType.js
the noConflict() works perfect for jQuery, but the dataTable.jQuery.js says function not found and tries to look into protoType.js....
Any idea to get arround this.. ??

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi sobersp,

    DataTables should already work with $.noConflict() - indeed I've seen people running it along side Prototype/Dojo etc no problem. That's not to say that it's possible that there is a bug, but it would have expected this to work. Do you have a link you could provide showing the issue? There needs to be the jQuery include, DataTables include, and then the jQuery.dataTable() initialisation.

    Regards,
    Allan
  • soberspsobersp Posts: 28Questions: 0Answers: 0
    Thanks Allan for the Quick Response,

    I have below lines of Inludes


    jQuery.noConflict()



    And all this is in Master Inlucde JSP which is included through all JSP's

    the ready Function works good....but
    jQuery("#id1").datatable(options);
    ....Wont work

    Am I doing somthing wrong ?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi sobersp,

    Two things to sanity check first:

    1. jquery.datatable.js - the default fail name is jquery.dataTables.js, so unless you've renamed it, the it won't be included.
    2. Query("#id1").datatable - the method DataTables provides is called 'dataTable' - so you will get an error if you try to call datatable().

    If it's not either of these, let me know and we can dig deeper.

    Regards,
    Allan
  • dieterdieter Posts: 1Questions: 0Answers: 0
    Hi,

    did you find a solution?

    I'm having the same problem. (using correct naming of src & methods)

    With prototype loaded, dataTable() function not found.
  • anuraganurag Posts: 1Questions: 0Answers: 0
    I am also facing the same issue? any clue to get rid of this? is there any document there we can see all the name and signature of all the functions that datatable uses, so we can call those from datatable styles and other we can call like jquery style
    means
    if jquery function so we will call jQuery("#myId").hide();
    and if datatable then that should be datatable("#myDTTable").datatable();
    pls suggest me ASAP if possible, your help will be highly appreciable

    Anurag
This discussion has been closed.