Request for Ajax with data-coloris #140
-
Hi, I hope this email finds you well. Firstly, I wanted to extend my sincerest regards for the incredible work you've done with Coloris.js. It's an invaluable tool that has greatly enhanced the functionality and aesthetics of my projects. However, I'm currently encountering an issue that I was hoping you could assist me with.
...
Despite the object remaining visible, the color display is not functioning as expected after the AJAX reload.
I would greatly appreciate any guidance or assistance you could provide in resolving this issue. Thank you once again for your outstanding contribution to the development community. Looking forward to your response. Best regards Mirco |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 5 replies
-
The color fields within the new HTML you reload using AJAX need to be processed again by Coloris.wrap('[data-coloris]'); |
Beta Was this translation helpful? Give feedback.
-
Perfect! It works! One question more, is it possbile to have in HEX the color here: |
Beta Was this translation helpful? Give feedback.
-
There is no reliable way to do that. |
Beta Was this translation helpful? Give feedback.
-
Dont worry, doesnt matter. |
Beta Was this translation helpful? Give feedback.
-
If you want to set the color format to HEX, you can do it by setting the |
Beta Was this translation helpful? Give feedback.
-
It prints inside the field, Hex value but in HTML, the style of <div class="clr-field" is still in rgb. |
Beta Was this translation helpful? Give feedback.
-
The color value is automatically converted to rgb() by the browser no matter what color format is used to set it. |
Beta Was this translation helpful? Give feedback.
-
The input value is not updated, its just updated the css value of that div |
Beta Was this translation helpful? Give feedback.
You need to use Javascript to retrieve the value. For example in this case: