Add jQuery plugin support
- Dominant language
- JavaScript
- Stars
- 411
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
**Add at 👍 reaction** to this issue if you want Huebee to add jQuery plugin support. Do not add a "+1" comment — they will be deleted. Subscribe using the button in the sidebar for updates on this feature request.
---
I understand some users might be scared off by vanilla JS syntax `new Huebee()`, and are more comfortable with jQuery syntax `.huebee()`. Huebee jQuery plugin support would look like:
``` js
// initialize
var $colorInput = $('.color-input').huebee({
// options
});
// methods
$colorInput.huebee( 'setColor', '#C25' );
$colorInput.huebee('open');
$colorInput.huebee('close');
// events
$colorInput.on( 'change.huebee', function( event, color, hue, sat, lum ) {
console.log( 'color changed to: ' + color );
});
```
I've decided against jQuery support as I'd like to keep Huebee's source code small and simple. I don't feel jQuery support adds that much value over vanilla JS. jQuery plugin methods (i.e. `.huebee( 'setColor', '#C25' )` do more to obfuscate actual JavaScript than to help understand it.
But, jQuery is widely popular and Huebee's user base is likely more comfortable with it, than vanilla JS.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing Huebee's existing vanilla JavaScript API and the jQuery-style initialization, methods, and events shown in the issue. Any implementation would be complete when the jQuery syntax supports initialization, setColor, open, close, and change.huebee events, but the maintainer's stated decision against jQuery support needs resolution first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100