Skip to content
This repository has been archived by the owner on Feb 9, 2025. It is now read-only.

Commit

Permalink
add table responsive at box-body table
Browse files Browse the repository at this point in the history
  • Loading branch information
fherryfherry committed Oct 9, 2016
1 parent 458f9ec commit b6e313e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/views/default/table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,25 @@
</div>
</div>

<div class="box-body no-padding">
<script type="text/javascript">
$(document).ready(function() {
var $window = $(window);
function checkWidth() {
var windowsize = $window.width();
if (windowsize > 500) {
console.log(windowsize);
$('#box-body-table').removeClass('table-responsive');
}else{
console.log(windowsize);
$('#box-body-table').addClass('table-responsive');
}
}
checkWidth();
$(window).resize(checkWidth);
});
</script>

<div id='box-body-table' class="box-body table-responsive no-padding">
<table id='table_dashboard' class="table table-hover table-striped">
<thead>
<tr>
Expand Down

0 comments on commit b6e313e

Please sign in to comment.