Simple Jquery Bootstrap Color Picker Plugin Example

Simple Jquery Bootstrap Color Picker Plugin Example

In this tutorial, I will tell you how to use bootstrap color picker in your form.

It's very easy to pick a color for your component using Bootstrap color picker.

Bootstrap color picker provide multiple formats to add color like hex,rgb etc.

There are so many jquery plugins are available for adding color picker but Bootstrap color picker provide responsive color selector that can be easily integrate into your website.

You can easily customize color picker as per your needs, mainly this is used in admin interface for allowing user or visitors to customize theme color.

You can get this plugin on GitHub website that is developed by mjoinic.

  1. <html lang="en">
  2. <head>
  3. <title>Bootstrap Color Picker Plugin Example</title>
  4. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
  5. <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.3.6/css/bootstrap-colorpicker.css" rel="stylesheet">
  6. <script src="https://code.jquery.com/jquery-2.2.2.min.js"></script>
  7. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  8. <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.3.6/js/bootstrap-colorpicker.js"></script>
  9. </head>
  10. <body>
  11. <div class="container">
  12. <h1>Bootstrap Color Picker Plugin Example</h1>
  13. <div id="cp2" class="input-group colorpicker-component">
  14. <input type="text" value="#00AABB" class="form-control" />
  15. <span class="input-group-addon"><i></i></span>
  16. </div>
  17. </div>
  18. <script type="text/javascript">
  19. $('#cp2').colorpicker();
  20. </script>
  21. </body>
  22. </html>

Phone: (+91) 8800417876
Noida, 201301