php - Bootstrap pagination an inline implementation -
again sitting bootstrap implementation project.
i'm implementing bootstrap pagination(data-table) , bootstrap inline edit(xeditable).
both files have been integrated successfully
the header file follows:
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="css/dt_bootstrap.css"> <link href="css/bootstrap-editable.css" rel="stylesheet"/> <script type="text/javascript" language="javascript" src="js/jquery-1.11.0.min.js"></script> <script type="text/javascript" language="javascript" src="js/jquery_002.js"></script> <script type="text/javascript" language="javascript" src="js/dt_bootstrap.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/bootstrap-editable.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('.editable_class').editable({ type: 'select', url: 'process.php', title: 'enter value', validate: function(value) { if($.trim(value) == '') { return 'this field required'; } } }); }); </script> the body tag looks this
<a data-original-title="select number" data-source="{'0': '0','1': '1', '2': '2', '3': '3', '4': '4', '5': '5', '6': '6', '7': '7', '8': '8', '9': '9', '10': '10'}" data-value="<?php echo $get_my_value; ?>" data-pk="<?php echo $row['book_code']."_".$book_id[$i]['id']; ?>" data-name="book_value" data-type="select" id="book_value" href="#" class="editable_class"><?php echo $get_my_value; ?></a> the problem is: 1. i'm able edit first page no issues. when click pagination (i.e. second page) edit not working. in other words, edit works fine in first page, , not working in next coming pages (there more 10 pages)
when inspect firebug first page anchor tag looks this
<a class="editable_class editable editable-click" href="#" id="book_value" data-type="select" data-name="book_value" data-pk="1" data-value="5" data-source="{'0': '0','1': '1', '2': '2', '3': '3', '4': '4', '5': '5', '6': '6', '7': '7', '8': '8', '9': '9', '10': '10'}" data-original-title="enter value">5</a>
the second page anchor tag looks this
<a class="editable_class" href="#" id="book_value" data-type="select" data-name="book_value" data-pk="1" data-value="5" data-source="{'0': '0','1': '1', '2': '2', '3': '3', '4': '4', '5': '5', '6': '6', '7': '7', '8': '8', '9': '9', '10': '10'}" data-original-title="enter value">5</a> if compare above 2 anchor tag, clear first page class name "editable_class editable editable-click" , second page class name "editable_class"
so can identify issue also, - how fix it?
any helpful
thanks, kimz
i think should reinitialize editable again after pagination. because second anchor tag created dynamically. use again after second page has appeared using pagination
$('.editable_class').editable({ type: 'select', url: 'process.php', title: 'enter value', validate: function(value) { if($.trim(value) == '') { return 'this field required'; } } });
Comments
Post a Comment