Comments (9)
You need to use the API. Please read the docs.
$('.minicolors.opacity').minicolors('value', '#ffcc00')
This issue tracker is for plugin-related issues, not for implementation support. If you find a bug, feel free to post. If you just need help getting it to work, first read the docs. Then try StackOverflow.
from jquery-minicolors.
I don't understand: this is not an implementation issue, this is a plugin issue.
If a color in a picker changes when I edit the value in the input textbox, it should be transparent when I clear the input, right? It is binded to it.
from jquery-minicolors.
You said you're setting the color programmatically, but implied that you weren't using that API. Use the value method to set it and the color will change.
On Mar 1, 2013, at 4:06 AM, rvision [email protected] wrote:
I don't understand: this is not an implementation issue, this is a plugin issue.
If a color in a picker changes when I edit the value in the input textbox, it should be transparent when I clear the input, right? It is binded to it.
—
Reply to this email directly or view it on GitHub.
from jquery-minicolors.
So $('INPUT').val('') should not work?
Calling API methods for this is not intuitive, IMHO.
If color changes when I change the value in the input field manually, the value in the picker should change. This 2-way binding is semi-working: works for values but not when empty.
from jquery-minicolors.
No, because it's impossible for JavaScript to poll an input element for changes without being extremely resource intensive. Most (all?) jQuery plugins work like this, as do plugins from similar libraries. You can look at some of the jQuery UI widgets such as DatePicker and Slider...they all have set/get methods as well.
Once you initialize a control, pretends it's not an input element anymore. It's a minicolors element, so use the API. It's a pretty standard thing :)
from jquery-minicolors.
I agree, they all have get/set methods, but when I change date in datepicker input field, it also changes the datepicker's value. When I erase the date value completely, it resets the datepicker to today's date:
http://jqueryui.com/datepicker/
I will make workaround for this, but I definitely think it is not intuitive.
from jquery-minicolors.
Yes, it does...on keyup. Just like MiniColors: http://labs.abeautifulsite.net/jquery-miniColors/
There's obviously a misunderstanding at one end...what do you think needs to be fixed? Everyone else seems to get it.
On Friday, March 1, 2013 at 4:49 AM, rvision wrote:
I agree, they all have get/set methods, but when I change date in datepicker input field, it also changes the datepicker's value. When I erase the date value completely, it resets the datepicker to today's date:
http://jqueryui.com/datepicker/
I will make workaround for this, but I definitely think it is not intuitive.—
Reply to this email directly or view it on GitHub (#77 (comment)).
from jquery-minicolors.
...unless I'm missing something, but if you're using .val() you can't expect it to work.
from jquery-minicolors.
Novermind, nevertheless it's a great plugin :)
I will make some hacks in implementation.
from jquery-minicolors.
Related Issues (20)
- Position failed HOT 1
- The position of the picker does not work correctly when the scale value of the body tag is changed. HOT 1
- Request: beforeShow event
- How to import minicolors with webpack? HOT 3
- Performance bugs HOT 3
- displaying HEX code in the color picker panel itself HOT 2
- getting a checked image when selecting a preset swatch HOT 4
- Problem with opacity + wheel HOT 1
- Option to show text input with `inline` option? HOT 1
- Scrolling on mobile HOT 5
- jQuery 4 deprecation warnings
- Any chance of updating this to HDR colours? HOT 1
- Updating settings with shorter array of swatches causes exception
- Initial selection is black HOT 1
- Update github website URL HOT 1
- Use 'Transparent' on swatches HOT 3
- Worst documentation I've even seen ! HOT 1
- bootstrap 5 theme & input-group
- Dynamically add mincolors to a field HOT 1
- Duplicated values in the swatch result in multiple same colors in the swatch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-minicolors.