• Research
  • Contact
  • Personal
  • Notes
  • Blog
  • Help
    • Report an Issue
    • FAQ

Game

Published

8/31/23

Before game

Code
FileAttachment("/images/memorylane/halloween.jpg").image({
  onclick: (e)=> { 
    console.log(`${e.target.tagName} clicked`)
    e.target.style.border="10px solid black"
  },
  onmouseover: (e)=> {
    e.target.style.width="300px"
    e.target.style.filter="grayscale(0)"
  },
  onmouseout:  (e)=> {
    e.target.style.width="200px"
    e.target.style.filter="grayscale(.5)"
  },
  classList: "foobar baz",
  style: "cursor: pointer;"
})
Code
viewof text = Inputs.text({submit: true})
viewof name = Inputs.text({label: text, placeholder: "Enter your name", value: "Anonymous"})

After game!