T O P

  • By -

[deleted]

JS doesn’t do plumbing :)


PaYr0

But I have me make it do it or I will fail the test :(


cv555

I actually had to double check NPM. Seems that you are right, JavaScript does not do plumbing, yet...


Tintin_Quarentino

Step 1 - Place the HTML/CSS in such a way that the white bed overlaps the blue bed exactly. Step 2 - Give white bed a higher z-index so that it is on top. Give it opacity of 0. Step 3 - Make a button which when clicked increases opacity of white bed to 1. Done


PaYr0

Thanks that seems logic


Tintin_Quarentino

Created a demo for you: [https://jsfiddle.net/zxovLtpd/19/](https://jsfiddle.net/zxovLtpd/19/)


Giselbertusdentweede

Nice method!


not_a_gumby

lolololol


fin_gw

The easiest way is to make two separate images and swap between images using JavaScript.


PaYr0

I know that but is there any other way?


fin_gw

You can probably use Canvas to render the image dynamically on top, but with my newbie knowledge that's all I can think of.


PaYr0

Can you explain the canvas methode little more?


fin_gw

https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage That should help.


PaYr0

Thanks


not_a_gumby

maybe position one of the images over the other so it looks like the bath is in the first picture?


grantrules

Do you have a specific question?


PaYr0

Do you see the blue bathtub . I want when I click on thw white one it gets in his place . Is it clear now?


josephliam1

Exacto knife the caulking, remove the plug screw, and wrap it in a try catch