Possible Duplicate:
conflict between Jquerys
i have a problem when i made lot of jQuery functions on the same file it did not work. In any jQuery tab i want to make a table with to possibility to sort it just by clicking on colonne.
I used this to add jQueryTabs:
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
and this for the sorting fonction:
<script type="text/javascript" src="jquery.js"></script>
I try to use de jQuery.noConflict() fonction but it didn’t work , where is the problem ?
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script>
jq172.noConflict();
jq172(document).ready(function()
{
var jQueryTabs1Opts =
{
event: 'click',
collapsible: false
};
jq172("#jQueryTabs1").tabs(jQueryTabs1Opts);
});
</script>
<script type="text/javascript" src="jquery.ui.core.min.js"></script>
<script type="text/javascript" src="jquery.ui.widget.min.js"></script>
<script type="text/javascript" src="jquery.ui.mouse.min.js"></script>
<script type="text/javascript" src="jquery.ui.tabs.min.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script>
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery('#example').dataTable( {
"aaSorting": [[ 4, "desc" ]]
} );
} );
</script>
<script type="text/javascript" src="jquery.dataTables.js"></script>
You need to do this:
That said, I’ve never tried this, and I don’t know how browser loading and caching would affect this. I’m not confident that the first
jQuery.noConflictwill call the 1.7.2 library. You might be better off using a library like Require.js to load and separate your modules, despite its coding and setup overhead.