Zebra Dialog box not showing up with a link in sdefaultcontent
Zebra Dialog box not showing up with a link in sdefaultcontent
aswebtechnology
Posts: 19Questions: 0Answers: 0
I am trying to add a delete confirmation box (Using zebra dialog box plugin) to the link in my datatable.
But the dialog is not showing up.
If i add class="confirm" in a simple tag then it shows up but not showing up in link in datatable. Please help me to fix it.
It is working if I put this link anywhere on the page here to open.
Here is my code
[code]
$(document).ready(function() {
// Zebra Dialog Box
$('.confirm').bind('click', function(e) {
e.preventDefault();
$.Zebra_Dialog('Are you sure, you want to delete it?', {
'type': 'question',
'buttons': ['Yes', 'No'],
'title': 'Confirmation'
});
});
// Datatables
var oTable = $('#view').dataTable( {
"aoColumnDefs": [
{
"fnRender": function (o) {
return ' ';
},
"aTargets": [4],
}
],
// sClass is used to pass css classes to columns
"aoColumns": [
{ "sWidth": "30px" },
{ },
{ "sClass": "aligncenter no_mobile", "sWidth": "50px" },
{ "bSearchable": false, "sClass": "no_mobile", "sWidth": "120px" },
{ "bSearchable": false, "bSortable": false, "sClass": "alignright", "sDefaultContent": "", "sWidth": "30px" }
],
"aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
"bAutoWidth": false,
"bProcessing": true,
"bServerSide": true,
"iDisplayLength": 20,
"oLanguage": {
"sZeroRecords": "No Record(s) To Display"
},
"sAjaxSource": "pages_view_source.php",
"sPaginationType": "full_numbers"
} );
});
} );
[/code]
But the dialog is not showing up.
If i add class="confirm" in a simple tag then it shows up but not showing up in link in datatable. Please help me to fix it.
It is working if I put this link anywhere on the page here to open.
Here is my code
[code]
$(document).ready(function() {
// Zebra Dialog Box
$('.confirm').bind('click', function(e) {
e.preventDefault();
$.Zebra_Dialog('Are you sure, you want to delete it?', {
'type': 'question',
'buttons': ['Yes', 'No'],
'title': 'Confirmation'
});
});
// Datatables
var oTable = $('#view').dataTable( {
"aoColumnDefs": [
{
"fnRender": function (o) {
return ' ';
},
"aTargets": [4],
}
],
// sClass is used to pass css classes to columns
"aoColumns": [
{ "sWidth": "30px" },
{ },
{ "sClass": "aligncenter no_mobile", "sWidth": "50px" },
{ "bSearchable": false, "sClass": "no_mobile", "sWidth": "120px" },
{ "bSearchable": false, "bSortable": false, "sClass": "alignright", "sDefaultContent": "", "sWidth": "30px" }
],
"aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
"bAutoWidth": false,
"bProcessing": true,
"bServerSide": true,
"iDisplayLength": 20,
"oLanguage": {
"sZeroRecords": "No Record(s) To Display"
},
"sAjaxSource": "pages_view_source.php",
"sPaginationType": "full_numbers"
} );
});
} );
[/code]
This discussion has been closed.
Replies
Allan