Created
February 6, 2015 09:14
-
-
Save evanhutomo/842d245a72cddf96728b to your computer and use it in GitHub Desktop.
little mod for color picker from http://vanderlee.github.io/colorpicker/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//because of colorpicker object use catch click event, I use onHover event to get the id's | |
$('tr.txtMark td input[type=text]').on('hover', function(){ | |
var sID = $(this).attr('id'); | |
$('#' + sID).colorpicker({ | |
title: "Header Background Colour", | |
dragggable: true, | |
closeOnOutside: false, | |
revert: true, | |
parts: ['header', 'map', 'bar', 'hex', 'preview', 'footer'], | |
ok: function () { | |
var colorVal = $('#' + sID).val(); | |
$('#' + sID).val('#' + colorVal); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment