Two separate jQuery scripts clashing?
Two separate jQuery scripts clashing?
redmanstanding
Posts: 4Questions: 0Answers: 0
Hi, I love the datatables software but I've hit a hurdle after searching the forum high and low for a solution. What it is, I have the dataTables script and a YouTube popup script on the same page and understand from what I've read that I might need to include jQuery.noConflict() for both of them to work on the same page. As you can see below, I have a a href class on the link but when I click it, it just leads me to the actual YouTube page and doesn't trigger the youtubepopup script to function on the page. I've also read that http://datatables.net/examples/advanced_init/row_callback.html would work for this but unsure how to implement it here:
[code]
$(function () {
$("a.youtube").YouTubePopup({ 'autoplay': 1, 'hideTitleBar': true });
});
$('#tr').fadeIn();
$(document).ready(function() {
$('#example').dataTable( {
bProcessing: true,
bServerSide: true,
sPaginationType: 'full_numbers',
bJQueryUI: true,
sAjaxSource: 'server_processing.php',
aoColumns:[
null,
null,
null,
{ bSearchable: false, bSortable: false, fnRender: function (oObj) { return '';
}
}
],
} );
} );
[/code]
I hope someone with more knowledge can help me please. Thanks in advance.
[code]
$(function () {
$("a.youtube").YouTubePopup({ 'autoplay': 1, 'hideTitleBar': true });
});
$('#tr').fadeIn();
$(document).ready(function() {
$('#example').dataTable( {
bProcessing: true,
bServerSide: true,
sPaginationType: 'full_numbers',
bJQueryUI: true,
sAjaxSource: 'server_processing.php',
aoColumns:[
null,
null,
null,
{ bSearchable: false, bSortable: false, fnRender: function (oObj) { return '';
}
}
],
} );
} );
[/code]
I hope someone with more knowledge can help me please. Thanks in advance.
This discussion has been closed.
Replies
Allan
[code]
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sPaginationType": 'full_numbers',
"bJQueryUI": true,
"sAjaxSource": 'server_processing.php',
aoColumns:[
null,
null,
null,
{ bSearchable: false, bSortable: false, fnRender: function (oObj) { return ''; }}
],
"fnDrawCallback": function() {
$("a.youtube").YouTubePopup({ autoplay: 1, hideTitleBar: true });
}
} );
} );
[/code]