"card list"
Bootstrap 3.0.0 Snippet by evarevirus

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="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!-- profile: 300x300 -->
<!-- poster: 136x190 -->
<!-- thumbnail: 320x240 -->
<div class="l-nav">
<div class="l-nav__container">
<button class="l-nav__button"> Submit </button>
</div>
</div>
<div class="l-container">
<ul>
<li class="list" data-name="JoeBrown">
<!-- Profile Section -->
<div class="list__profile">
<div> <img src="https://tinyurl.com/glz9lv7"> </div>
<div class="list__label">
<div class="list__label--header"> Name </div>
<div class="list__label--value"> JoeBrown </div>
</div>
</div>
<!-- Photo Thumbnail Section -->
<div class="list__photos">
<span> <img src="http://placehold.it/320x240"> </span>
<span> <img src="http://placehold.it/320x240"> </span>
<span> <img src="http://placehold.it/320x240"> </span>
</div>
</li>
<li class="list" data-name="JaneBrown">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
/* VARIABLES ==================== */
/* BASE ==================== */
@import "https://fonts.googleapis.com/css?family=Open+Sans";
body {
margin: 0;
font-family: 'Open Sans', sans-serif;
background-color: #e0e0e0;
}
body ul {
padding: 0;
list-style-type: none;
}
img {
width: 75px;
margin: 7px 5px 5px 5px;
border-radius: 5px;
}
button {
border: none;
font-size: 1em;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
cursor: pointer;
}
button:focus {
outline: 0;
}
/* LAYOUT ==================== */
.l-nav {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
position: fixed;
width: 100%;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
// Add state class for selected
$(".list").click(function() {
$(this).toggleClass("is-list-selected");
});
// Iterate through list and find selected
$('.l-nav__button').click(function(){
var marked = [];
var not_marked = [];
$('.list').each(function(){
var has_selected = $(this).hasClass("is-list-selected");
if (has_selected == true) {
value = $(this).data("name");
marked.push(value);
}
else {
value = $(this).data("name");
not_marked.push(value);
}
});
console.log(marked);
console.log(not_marked);
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: