"Get Url by jquery and write css "
Bootstrap 4.1.1 Snippet by naimansari

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="table-1 LiveClassTable">
<table style="width: 100%; margin-bottom: 50px;">
<thead>
<tr>
<th style="background: #229aa8; color: white;"><strong>State</strong></th>
<th style="background: #229aa8; color: white;"><strong>City</strong></th>
<th style="background: #229aa8; color: white;"><strong>Date</strong></th>
</tr>
</thead>
<tbody id="myTable">
<tr class="alabama">
<td>Alabama</td>
<td>Birmingham</td>
<td>Jan 31 – Feb 2</td>
</tr>
<tr class="alabama">
<td>Alabama</td>
<td>Birmingham</td>
<td>Jun 19 – Jun 21</td>
</tr>
<tr class="alabama">
<td>Alabama</td>
<td>Birmingham</td>
<td>Sep 25 – Sep 27</td>
</tr>
<tr class="arizona">
<td>Arizona</td>
<td>Scottsdale</td>
<td>Apr 17 – Apr 19</td>
</tr>
<tr class="arizona">
<td>Arizona</td>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
.LiveClassTable #myTable tr {
display:none;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
jQuery(document).ready(function($){
url = window.location.href;
myurl = url.split("https://www.ahit.com/training/");
myloca = myurl[1].split("-home-inspection-training");
$("tr."+myloca[0]).css("display","table-row");
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: