Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Bootstrap Snippet for Datatable"
Bootstrap 3.3.0 Snippet by
xrozix
3.3.0
jQuery
table
datatable
Preview
HTML
JS
View Full Screen
Forked from
Fork
Fork this
Parent
96
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="http://getbootstrap.com/dist/js/bootstrap.min.js"></script> <div class="container"> <div class="row"> <div class="col-md-12"> <h4>Bootstrap Snipp for Datatable</h4> <button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#edit" data-placement="top" title="新增留言"><span class="glyphicon glyphicon-pencil"></span> 新增留言</button> <div class="table-responsive"> <table id="mytable" class="table table-bordred table-striped"> <thead> <th><input type="checkbox" id="checkall" /></th> <th>留言類別</th> <th>內容概述</th> <th>留言時間</th> <th>更新時間</th> <th>回覆數</th> <th>已查閱</th> </thead> <tbody> <tr> <td><input type="checkbox" class="checkthis" /></td> <td>Mohsin</td> <td>Irshad</td> <td>CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan</td> <td>isometric.mohsin@gmail.com</td> <td>+923335586757</td> <td>+923335586757</td> </tr> <tr> <td><input type="checkbox" class="checkthis" /></td> <td>Mohsin</td> <td>Irshad</td> <td>CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan</td> <td>isometric.mohsin@gmail.com</td> <td>+923335586757</td> <td>+923335586757</td> </tr> <tr> <td><input type="checkbox" class="checkthis" /></td> <td>Mohsin</td> <td>Irshad</td> <td>CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan</td> <td>isometric.mohsin@gmail.com</td> <td>+923335586757</td> <td>+923335586757</td> </tr> <tr> <td><input type="checkbox" class="checkthis" /></td> <td>Mohsin</td> <td>Irshad</td> <td>CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan</td> <td>isometric.mohsin@gmail.com</td> <td>+923335586757</td> <td>+923335586757</td> </tr> <tr> <td><input type="checkbox" class="checkthis" /></td> <td>Mohsin</td> <td>Irshad</td> <td>CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan</td> <td>isometric.mohsin@gmail.com</td> <td>+923335586757</td> <td>+923335586757</td> </tr> </tbody> </table> <div class="clearfix"></div> <ul class="pagination pull-right"> <li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-left"></span></a></li> <li class="active"><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> <li><a href="#"><span class="glyphicon glyphicon-chevron-right"></span></a></li> </ul> </div> </div> </div> </div> <div class="modal fade" id="edit" tabindex="-1" role="dialog" aria-labelledby="edit" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button> <h4 class="modal-title custom_align" id="Heading">新增留言</h4> </div> <div class="modal-body"> <div class="form-group"> <p>會員暱稱:</p> </div> <div class="form-group"> <select class="form-control" placeholder="*留言類別"> <option>系統問題</option> <option>主播問題</option> <option>購點問題</option> <option>合作問題</option> <option>其他問題</option> </select> </div> <div class="form-group"> <textarea rows="2" class="form-control" placeholder="留言內容: ( ENTER 換行 )"></textarea> </div> </div> <div class="modal-footer "> <button type="button" class="btn btn-success" ><span class="glyphicon glyphicon-ok-sign"></span> 送出</button> <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> 重設</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <div class="modal fade" id="delete" tabindex="-1" role="dialog" aria-labelledby="edit" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button> <h4 class="modal-title custom_align" id="Heading">Delete this entry</h4> </div> <div class="modal-body"> <div class="alert alert-danger"><span class="glyphicon glyphicon-warning-sign"></span> Are you sure you want to delete this Record?</div> </div> <div class="modal-footer "> <button type="button" class="btn btn-success" ><span class="glyphicon glyphicon-ok-sign"></span> Yes</button> <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> No</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div>
$(document).ready(function(){ $("#mytable #checkall").click(function () { if ($("#mytable #checkall").is(':checked')) { $("#mytable input[type=checkbox]").each(function () { $(this).prop("checked", true); }); } else { $("#mytable input[type=checkbox]").each(function () { $(this).prop("checked", false); }); } }); $("[data-toggle=tooltip]").tooltip(); });
Related:
See More
Free Template
Full Calendar
602.7K
506
Bootstrap Snippet for Datatable
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76