Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.box').ColorPicker();
- $(document).on('click', '.box', function(){
- $(this).ColorPicker();
- });
- <div class="colorpicker">
- <div class='box'>Color</div>
- </div>
- <input type="button" id="btn1" value="Add New Color Picker" />
- $(function() {
- // Adding the Default colorPicker here
- $('.box').ColorPicker();
- $('#btn1').on('click' , function(){
- // Add the ColorPicker to the new Element added Here
- $('.colorpicker').append('<div class="box1">New Color</div>');
- $('div div').last().ColorPicker();
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement