Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"pallete"
Bootstrap 3.3.0 Snippet by
Burny0205
3.3.0
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
1.7K
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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 ----------> <div class="row2"> <div class="col-md-1 col"> <div class="flex-item red"></div> <div class="flex-item green"></div> </div> <div class="col-md-1 col"> <div class="flex-item green"></div> <div class="flex-item red"></div> </div> <div class="col-md-1 col"> <div class="flex-item blue"></div> <div class="flex-item green"></div> </div> <div class="col-md-1 col"> <div class="flex-item green" ></div> <div class="flex-item blue"></div> </div> <div class="col-md-1 col"> <div class="flex-item green" ></div> <div class="flex-item green"></div> </div> <div class="col-md-1 col"> <div class="flex-item blue" ></div> <div class="flex-item blue"></div> </div> </div>
html, body { height: 100%; } body { margin: 0; } .red{ background-color:red; } .green{ background-color:green; } .blue{ background-color:blue; } .flex-container { height: 100%; margin: 3; } .row2 { display: inline-block; } .col{ cursor:pointer; width:28px; padding:0; align:center; border: transparent 2px solid; margin:4px 0px; } .col:hover{ border: 2px solid lightblue; border-radius:10px; } .sel{ z-index:10000; background-color:grey; } .flex-item { width: 20px; height: 20px; margin:2px; line-height: 20px; color: white; font-weight: bold; font-size: 2em; text-align: center; border-radius:50%; float:left }
$(".col").click(function (e) { alert('!'); $(this).toggleClass('sel'); $(this).siblings().removeClass('sel'); $("#colorPalette").val($(this).attr('id')); var id = $(this).attr('id'); }); $("span.tel").click(function (e) { $(this).toggleClass('glyphicon glyphicon-ok'); $(this).siblings().removeClass('glyphicon glyphicon-ok'); $("#colorPalette2").val($(this).attr('id')); var id = $(this).attr('id'); });
Related:
See More
Template
Vue Black Dashboard Pro
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76