Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Bootstrap colorpicker doesn't work. This is my code
<div class="form-group"style="margin-top:-10px">
<label style=" height:20px !important ;font-size: 12px;" class="col-sm-4
control-label">Kurye Durum Renk</label>
<div class="col-sm-7">
<input id="ColorPickerKuryeDurumRenk" type="text" class="form-control">
<link rel="stylesheet" src="plugins/colorpicker/bootstrap-colorpicker.min.css">
<script src="plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script>
$(document).ready(function(){
$("#ColorPickerKuryeDurumRenk").colorpicker();
</script>
When i runned the code like this, I didn't get any error but the colorpicker doesn't work . Where is my fail ?
Pretty sure it is your lib path wrong or reference not correct.
try to use the following, if it is working then you can debug by removing them one by one (and use your local reference instead)
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.5.1/css/bootstrap-colorpicker.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.5.1/js/bootstrap-colorpicker.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.5.1/css/bootstrap-colorpicker.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.5.1/js/bootstrap-colorpicker.min.js"></script>
<div class="form-group"style="margin-top:-10px">
<label style=" height:20px !important ;font-size: 12px;" class="col-sm-4
control-label">Kurye Durum Renk</label>
<div class="col-sm-7">
<input id="ColorPickerKuryeDurumRenk" type="text" class="form-control">
<link rel="stylesheet" src="plugins/colorpicker/bootstrap-colorpicker.min.css">
<script src="plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script>
$(document).ready(function(){
$("#ColorPickerKuryeDurumRenk").colorpicker();
</script>
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.