-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiso.html
More file actions
73 lines (57 loc) · 1.66 KB
/
iso.html
File metadata and controls
73 lines (57 loc) · 1.66 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!doctype html>
<html lang="en">
<head>
<style>
.element-item {
float: left;
width: 100px;
height: 100px;
margin: 5px;
background: #888;
}
</style>
</head>
<body >
<div class="button-group filters-button-group">
<button class="button" data-filter="*">All</button>
<button class="button" data-filter=".react">React</button>
<button class="button" data-filter=".js">JS</button>
<button class="button" data-filter=".html">Html</button>
</div>
<div class="grid">
<div class="element-item react " data-category="react">
<h3 class="name"> React01</h3>
<p class="symbol">Hg</p>
</div>
<div class="element-item react " data-category="react">
<h3 class="name">Tellurium</h3>
<p class="symbol">Te</p>
</div>
<div class="element-item js " data-category="js">
<h3 class="name">Bismuth</h3>
<p class="symbol">Bi</p>
</div>
<div class="element-item js " data-category="js">
<h3 class="name">Lead</h3>
<p class="symbol">Pb</p>
</div>
<div class="element-item html " data-category="html">
<h3 class="name">Gold</h3>
<p class="symbol">Au</p>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script>
<script>
let $grid = $('.grid').isotope({
itemSelector: '.element-item',
layoutMode: 'fitRows'
});
// bind filter button click
$('.filters-button-group').on( 'click', 'button', function() {
let filterValue = $( this ).attr('data-filter');
$grid.isotope({ filter: filterValue });
});
</script>
</body>
</html>