JSFiddle - React, Tailwind, and code Playground
by mblase75
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="test.css" />
<!-- For ease i'm just using a JQuery version hosted by JQuery- you can download any version and link to it locally -->
<script src="http://code.jquery.com/jquery-latest.js"></script>
<p>hello</p>
</br><div class="divTable" id='tableuno'>
<div class="headRow">
<div class="divCell" align="center">VIP Name</div>
<div class="divCell">IP</div>
<div class="divCell">Ports</div>
<div class="divCell">Method</div>
<div class="divCell">Mode</div>
<div class="divCell">Protocol</div>
<div class="divCell">Graph</div>
</div>
<div class="divRow">
<div class="divCell">Rip Label</div>
<div class="divCell">IP</div>
<div class="divCell">ports</div>
<div class="divCell">Weight</div>
<div class="divCell">onlineoffline</div>
<div class="divCell">updownarrow</div>
<div class="divCell">graph</div>
</div>
<div class="divRow">
<div class="divCell">xxx</div>
<div class="divCell">yyy</div>
<div class="divCell">www</div>
</div>
<div class="divRow">
<div class="divCell">ttt</div>
<div class="divCell">uuu</div>
<div class="divCell">Mkkk</div>
</div>
</div>
</br>
</body>
</html>
CSS
.divTable{
display:table;
width:auto;
background-color:#eee;
border:1px solid #666666;
border-spacing:5px;
}
.divRow{
display:table-row;
width:auto;
clear:both;
background-color:#fff;
}
.headRow:hover {
filter:Alpha(opacity=55);
//-moz-opacity:0.55;
opacity:0.55;
//border:none;
}
.headRow {
display:table-row;
}
.divCell{
float:left;
display:table-column;
width:200px;
// background-color:#ccc;
}
JavaScript
$(document).ready(function() {
$(".headRow").click(function() {
//alert("hello");
//console.log("here")
var $divRow = $(this).nextAll(".divRow");
if ($divRow.is(":hidden")) {
$divRow.show('fast');
}
else {
$divRow.hide('fast');
}
});
});