Skip to content

Instantly share code, notes, and snippets.

@zonayedpca
Last active March 15, 2018 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zonayedpca/5fbaebdbb817212c724d97471bc0eebc to your computer and use it in GitHub Desktop.
Save zonayedpca/5fbaebdbb817212c724d97471bc0eebc to your computer and use it in GitHub Desktop.
<!-- saved from url=(0096)file:///C:/Users/Zonayed%20Ahmed/AppData/Roaming/Skype/My%20Skype%20Received%20Files/index2.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Product Select</title>
<link rel="stylesheet" href="./Product Select_files/bootstrap.min.css">
<!-- jQuery library -->
<script src="./Product Select_files/jquery.min.js.download"></script>
<!-- Latest compiled JavaScript -->
<script src="./Product Select_files/bootstrap.min.js.download"></script>
</head>
<body>
<div class="pv-dropdown-area">
<div class="col-md-offset-3 col-md-6 col-md-offset-3">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-table"></i> Table Detail
</div>
<div class="panel-body no-padding table-responsive" style="max-height: 400px;overflow: auto;">
<form action="file:///C:/Users/Zonayed%20Ahmed/AppData/Roaming/Skype/My%20Skype%20Received%20Files/index2.html" method="get">
<table id="table-productattribute" class="table table-striped table-bordered table-work">
<thead>
<tr>
<th>Product Attribute Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="attribute_id">Size</td>
<td class="description">rrrr,44444,ttt</td>
</tr>
<tr>
<td class="attribute_id">Color</td>
<td class="description">red,green</td>
</tr>
<tr>
<td class="attribute_id">Weight</td>
<td class="description">50,20</td>
</tr>
</tbody>
</table>
<input type="button" class="btn btn-primary table-submit" value="Submit" onclick="newk()">
</form>
</div>
</div>
</div>
<div class="col-md-offset-3 col-md-6 col-md-offset-3">
<div class="row" id="viewsdata">
<table id="table-main" class="table table-striped table-bordered" style="opacity: 0">
<thead>
<tr>
<th>Product Attribute Type</th>
<th>Description</th>
</tr>
</thead>
<tbody class="view-table">
</tbody>
</table>
</div>
</div>
</div>
<script type="text/javascript">
function newk(){
var mainTable = document.querySelector('#table-main'),
alltr = document.querySelectorAll('.table-work tr'),
viewTable = document.querySelector('.view-table');
mainTable.style.opacity = 1;
alltr.forEach(function(tr) {
if(tr.parentElement.nodeName == 'THEAD') {
return;
} else {
viewTable.insertAdjacentHTML('afterbegin', '<tr><td>one</td><td>two</td></tr>');
}
});
}
</script>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment