Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现这个颜色选择器http://pastebin.com/17cPkjAT 我的问题是,如果通过 jquery 将文本设置到输入框,颜色选择器将不会“听到”新文本。
例子:
唯一改变的是文本,而不是颜色,结果:
Call .change() after updating the value:
.change()
$(selector).val("#FFFFFF").change();