Referencing 2 Jquery Sources Conflict?
Referencing 2 Jquery Sources Conflict?
Raven
Posts: 28Questions: 0Answers: 0
I have Datatables folder with everything that should be in it to use. When i reference
[code]
[/code]
then it works. But now i wanna add animations to some of the things on my site for that i downloaded Jquery-17.1.js
and i call it like this:
[code]
[/code]
cause its in a different folder and its got all the fade in's fade out. problem is if i source refence my js and the datatable js
then not new cool repeater or my fade in fadeout wants to work?
This is for my repeater table... thank you its awesome.
[code]
$(document).ready(function () {
$('#tblMatters').dataTable({ "oLanguage": { "sSearch": "Search:" },
"iDisplayLength": 10,
"aaSorting": [[0, "asc"]]
});
});
[/code]
This is for my button animation
[code]
$(document).ready(function(){
$('#hideButton').click(function(){
$('#disclaimer').fadeOut();
});
});
[/code]
What should i do?
thank you in advance
[code]
[/code]
then it works. But now i wanna add animations to some of the things on my site for that i downloaded Jquery-17.1.js
and i call it like this:
[code]
[/code]
cause its in a different folder and its got all the fade in's fade out. problem is if i source refence my js and the datatable js
then not new cool repeater or my fade in fadeout wants to work?
This is for my repeater table... thank you its awesome.
[code]
$(document).ready(function () {
$('#tblMatters').dataTable({ "oLanguage": { "sSearch": "Search:" },
"iDisplayLength": 10,
"aaSorting": [[0, "asc"]]
});
});
[/code]
This is for my button animation
[code]
$(document).ready(function(){
$('#hideButton').click(function(){
$('#disclaimer').fadeOut();
});
});
[/code]
What should i do?
thank you in advance
This discussion has been closed.
Replies
Include your files like:
[quote]
jQuery
DataTables
other plug-ins
[/quote]
Allan
Microsoft JScript runtime error: Object doesn't support property or method 'dataTable'
[code]
<!--This is coding for the repeater -->
$(document).ready(function () {
$('#tblSearchCust').dataTable({ "oLanguage": { "sSearch": "Search:" },
"iDisplayLength": 10,
"aaSorting": [[0, "asc"]]
});
});
$(document).ready(function () {
$('#btnSubmit').click(function () {
$('#tblSearchCust').fadeOut("slow");
});
});
[/code]
and this is my button and repeater:
[code]
Search Results
DR No
ect.......
[/code]
ID
[/code]
[code]
[/code]
Then my repeater works but then my fade in doesnt work
Just include it once - the version that shipped with DataTables 1.8.2 was jQuery 1.6.2. It could be that your fade needs 1.7.1? Just include that library rather than the jQuery version that DataTables shipped with. So the load order would be:
jQuery 1.7.1
DataTables
other stuff
Allan
to let you now this is my first working year experience which i have only 3 months under my belt :D but dont worry about taking it easy on me, as i do go research crazy to bring up my understanding.
How much do guys normaly donate to your site, if i can get a range? i also wanna contribute.
[code]
[/code]
Loading jQuery twice is something that catches just about everyone out at some point. You are just a fast learner obviously ;-)
Allan