Git Product home page Git Product logo

Comments (9)

claviska avatar claviska commented on July 23, 2024

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.

rvision avatar rvision commented on July 23, 2024

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.

claviska avatar claviska commented on July 23, 2024

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.

rvision avatar rvision commented on July 23, 2024

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.

claviska avatar claviska commented on July 23, 2024

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.

rvision avatar rvision commented on July 23, 2024

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.

claviska avatar claviska commented on July 23, 2024

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.

claviska avatar claviska commented on July 23, 2024

...unless I'm missing something, but if you're using .val() you can't expect it to work.

from jquery-minicolors.

rvision avatar rvision commented on July 23, 2024

Novermind, nevertheless it's a great plugin :)

I will make some hacks in implementation.

from jquery-minicolors.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.