Jquery.noconflict

Jquery.noconflict

BMIUserBMIUser Posts: 3Questions: 0Answers: 0
edited September 2011 in DataTables 1.8
[code]



$(document).ready(function() {
$('#example').dataTable( {
"sPaginationType": "full_numbers"
} );
} );

[/code]

I want to use jquery.noConflict in the above script but not finding the right way do it.
When I use the above code it works but breaks my site as it interfears with the existing jquery.
How Can I use jquery.noconflict in te above code ?

Replies

  • jcrawfordjcrawford Posts: 172Questions: 0Answers: 0
    edited September 2011
    Jquery.noconflict is not for sites that run other jquery. that mode is for the case when you use both prototype and jquery libraries.

    the noconflict makes Jquery use calls like JQuery() rather than $() because both Prototype and JQuery both use the same $()

    If you are having issues it is not due to datatables not using noconflict mode.

    see this page for more information: http://api.jquery.com/jQuery.noConflict/
  • BMIUserBMIUser Posts: 3Questions: 0Answers: 0
    [code]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">





    DataTables example

    @import "../../media/css/demo_page.css";
    @import "../../media/css/demo_table.css";




    $(document).ready(function() {
    $('#example').dataTable( {
    "sPaginationType": "full_numbers"
    } );
    } );





    <!My HTML Table goes here">





    [/code]

    [quote] Heres the full code
    I am using the alt_pagination example code from the basic_init folder.
    [/quote]
  • BMIUserBMIUser Posts: 3Questions: 0Answers: 0
    I spoke with the team who made the site they said I will have to use jquery.noConflict()
    Just wanted to know how do I do it in the above code...
  • jcrawfordjcrawford Posts: 172Questions: 0Answers: 0
    I am not sure you will have to wait for someone more knowledgeable than I at DataTables. However if your developers are telling you to use no-conflict mode I wonder what they did on the development side that would cause you to have to do that. Does not sound right to me anyway.
This discussion has been closed.