It works fine when I change color. But on page load the preview background is showing jscolor default, not my set value as #AA0000. I guess I am doing something wrong with previewElement:'#pr1'. https://jscolor.com/docs/#api--opts--previewElement
What should I do to fix it?
PS. strangely enough it works fine on their sandbox, but still the problem above on my own html page. my html page does not contain anything other than code above. Please advise.
Like you said, the code you’ve posted works on the jscolor sandbox. Do you have any errors in your developer tools? Or do you have any other css which may be overriding?
Can you provide a link to your site? Would make it easier to debug the problem.