using jscolor.js on dynamic input

前端 未结 4 1473
说谎
说谎 2021-01-04 16:23

i\'m using color picker from http://jscolor.com/

i\'m trying to attach it to some dynamic inputs, but to no avail. dynamic inputs in terms of, on page load the input

4条回答
  •  春和景丽
    2021-01-04 17:08

    I just had this problem too but luckily it's easy to fix. You need to (re)init jscolor after you have dynamically created your inputs:

    jscolor.init()
    

提交回复
热议问题