Bootstrap snippet and html example. list check box

This html snippet was created to help web designers, web developers, front-end and back-end developer save time. Use it for free in your project and build your app faster, You can also download the HTML, CSS, and JS code.

HTML code

This is the html code used to create this bootstrap snippet, You can copy and paste the following html code inside a page with bootstrap 3.3.6 included, to get the result that you can see in the preview selection



     <div class="btn-group" data-toggle="buttons">   
        <label class="btn btn-success active">
    			<input type="checkbox" autocomplete="off" checked>
				<span class="glyphicon glyphicon-ok"></span>
                周國回
                <span class='badge'>12</span>
			</label>
        
       </div >
       
       
       <div class="well" style="max-height: 300px;overflow: auto;">
            	<ul class="list-group checked-list-box">
                  <li class="list-group-item"><input type="checkbox" class="hidden" /><span class="glyphicon glyphicon-unchecked"></span>周國回<span class='badge'>12</span></li>
                  <li class="list-group-item" data-checked="true"><input type="checkbox" class="hidden" /><span class="glyphicon glyphicon-check"></span>周國回<span class='badge'>12</span></li>
                  <li class="list-group-item">Morbi leo risus</li>
                  <li class="list-group-item">Porta ac consectetur ac</li>
                  <li class="list-group-item">Vestibulum at eros</li>
                  <li class="list-group-item">Cras justo odio</li>
                  <li class="list-group-item">Dapibus ac facilisis in</li>
                  <li class="list-group-item">Morbi leo risus</li>
                  <li class="list-group-item">Porta ac consectetur ac</li>
                  <li class="list-group-item">Vestibulum at eros</li>
                </ul>
            </div>
        

CSS code

This is the css code used to create this bootstrap snippet, You can copy and paste the following css code inside a page with bootstrap 3.3.6 included, to get the result that you can see in the preview selection



.btn span.glyphicon {        		
	opacity: 0;				
}
.btn.active span.glyphicon {				
	opacity: 1;				
}

/* CSS REQUIRED */
.state-icon {
    left: -5px;
}
.list-group-item-primary {
    color: rgb(255, 255, 255);
    background-color: rgb(66, 139, 202);
}

/* DEMO ONLY - REMOVES UNWANTED MARGIN */
.well .list-group {
    margin-bottom: 0px;
}

Javascript/Jquery code

This is the javascript code used to create this bootstrap snippet, You can copy and paste the following javascript code inside a page with bootstrap 3.3.6 included, to get the result that you can see in the preview selection


$(function () {
    $('.list-group.checked-list-box .list-group-item').click(function () {
       $(this).attr("class", "list-group-item list-group-item-primary");
       var item1 = $( "span" )[0];
       $(this).find("span").first().attr("class", "glyphicon glyphicon-check");
    });
    
   
}); 

Similar snippets

Bootstrap example and template. bs4 Home Profile

bs4 Home Profile

Bootstrap example and template. Profile canvas

Profile canvas

Bootstrap example and template. Inbox mail

Inbox mail

Bootstrap example and template. table user list

table user list

Bootstrap example and template. bs5 dark footer

bs5 dark footer

Bootstrap example and template. company team list with image a social links

company team list with image a social links

Bootstrap example and template. User list page

User list page

Bootstrap example and template. candidate list with skills rating and location

candidate list with skills rating and location

Bootstrap example and template. list check box

About this bootstrap example/template

We hope you will enjoy this awesome snippet and stay tuned for the latest updates, bootdey snippets are already used in thousands of blogs, websites and projects. We believe it will save your precious time and gives trendy look to your next web project.

We always try to offer the best beautiful and responsive source of Bootstrap code examples and components.

This code example currectly have 2.3K views, Using this bootstrap snippet you have the following benefits:

Bootstrap 3.3.6

<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>

<script src='https://netdna.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'></script>

This code example is based on bootstrap 3.3.6 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

Jquery plugins

Great built-in plugins with jquery framework, you can easy to change all declarations

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working