Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
jquery-simplecolorpicker
Advanced tools
Readme
I don't use jquery-simplecolorpicker anymore so I won't update this repository. If you have a well maintained fork, I will be happy to promote it here.
Yet another jQuery color picker. This plugin is unobtrusive and integrates well with Twitter Bootstrap (it works just fine without). The source code only requires jQuery and is about 200 lines of JavaScript and 100 lines of CSS.
See the online demo.
Create a HTML select:
<select name="colorpicker">
<option value="#7bd148">Green</option>
<option value="#5484ed">Bold blue</option>
<option value="#a4bdfc">Blue</option>
<option value="#46d6db">Turquoise</option>
<option value="#7ae7bf">Light green</option>
<option value="#51b749">Bold green</option>
<option value="#fbd75b">Yellow</option>
<option value="#ffb878">Orange</option>
<option value="#ff887c">Red</option>
<option value="#dc2127">Bold red</option>
<option value="#dbadff">Purple</option>
<option value="#e1e1e1">Gray</option>
</select>
add the plugin files:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js"></script>
<script src="jquery.simplecolorpicker.js"></script>
<link rel="stylesheet" href="jquery.simplecolorpicker.css">
then call the plugin:
$('select[name="colorpicker"]').simplecolorpicker();
$('select[name="colorpicker"]').simplecolorpicker('selectColor', '#7bd148');
$('select[name="colorpicker"]').simplecolorpicker('destroy');
and pass some options if needed:
$('select[name="colorpicker"]').simplecolorpicker({
picker: true
}).on('change', function() {
$(document.body).css('background-color', $('select[name="colorpicker"]').val());
});
''
), available themes: regularfont
, fontawesome
, glyphicons
false
)0
)Simplecolorpicker supports all modern browsers starting with Internet Explorer 8 included. It is recommended to not use any font theme with IE8.
HTML5 provides a new input to select colors. Its implementation inside modern browsers is still lacking. The new color input does not provide any option to customize the color list and most of the time the widget is less user-friendly than the one provided by simplecolorpicker.
See http://slides.html5rocks.com/#new-form-types
See http://dev.w3.org/html5/markup/input.color.html#input.color
bower install jquery-simplecolorpicker
See simplecolorpicker directive.
If you find a solution for the setTimeout()
hack, please tell me.
Here another directive written by KGZM that re-implements simplecolorpicker. For the explanations, read this Google Groups discussion.
A gem is available at https://github.com/tkrotoff/jquery-simplecolorpicker-rails
Licensed under the MIT license. Copyright (C) 2012-2013 Tanguy Krotoff
FAQs
Very simple jQuery color picker
The npm package jquery-simplecolorpicker receives a total of 783 weekly downloads. As such, jquery-simplecolorpicker popularity was classified as not popular.
We found that jquery-simplecolorpicker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.