Reputation: 77
Here is the code of my color picker. http://jsfiddle.net/7jg4e/728/
<img id="1" alt="test" src="https:/test.com/IMGService.ashx?imagetype=typeit&postid=7406&width=100%&height=142&RenderText=[field title]&TextSize=96&TextColor=%23ff0000&BgColor=%23ffffff">
Here is my img tag which is api convert text into image. i want to add colopicker to this image tag so user can change the color of image so i have colorpicker and every colorpick's out put with javascript or with Jquarry we need to use id tag but how i can get color name value in my BgColor=
I hope you understand my point.
i mean i want if user use color picker and pick one color its automatic update in BgColor in img filed like bellow
<img id="1" alt="test" src="https:/test.com/IMGService.ashx?imagetype=typeit&postid=7406&width=100%&height=142&RenderText=[field title]&TextSize=96&TextColor=%23ff0000&BgColor=%23**Color Picker color value Here**">
I want print colorpicker value here. is it possible
;BgColor=%23**Color Picker color value Here**">
Sorry For Poor English.
Upvotes: 0
Views: 117
Reputation: 221
let src = 'URL' + $('#color').val().replace('#','');
$('#1').attr('src', src);
Id 1 should not be valid within js/jquery.
Upvotes: 2