+ 1
How to.. image change when checkbox selected?
I want to make an image container that when I select a specific checkbox from my list the image changes. I'm using html. Can you help?
6 Answers
+ 1
I couldn't get "when checked" to work but; I made a .click event which changes the image when the option is pressed. Leaving the "checked event" available for any other thing to happen. :)
https://code.sololearn.com/WFDwO0Tu3Dw2/?ref=app
+ 2
You couldnāt do this with pure html
I guess you should use css and jquery also
+ 1
$(".checkbox").change(function() {
if(this.checked) {
//Do stuff
}
});
This this checkbox check status in query
+ 1
This would be the base of what I'm trying to do.
I want that when I check Brain1 checkbox, I get an image and when I check Brain 2 the image of the brain changes to another one
https://code.sololearn.com/WFaFTE301x37/?ref=app
+ 1
https://code.sololearn.com/WVI3FaQg41n7/?ref=app
0
I'm also using css. How would you achieve it with jQuery? I'm learning it now.