Live data from Hacker News

Show HN: Wiv.js – A library for a more wiggly div

jjkaufman.github.io

11–20 of 58 posts

Re: Show HN: Wiv.js – A library for a more wiggly div

#14

(edit: this assertion is incorrect, I skimmed the code too fast) I had no idea that you can draw on any element, not just canvas ones ... I thought there was a semantic meaning there ... apparently there isn't?

Looks like it's adding a canvas element to the divs and positioning it to line up.

Re: Show HN: Wiv.js – A library for a more wiggly div

#15

(edit: this assertion is incorrect, I skimmed the code too fast) I had no idea that you can draw on any element, not just canvas ones ... I thought there was a semantic meaning there ... apparently there isn't?

Looks like it's adding a canvas element to the divs and positioning it to line up.

Ah yes I missed the var canvas line and just presumed the code was getting a context on the selected div instead, a feature I didn't know was possible (it isn't).

The canvas declaration is staring right at me now that I review it again. That's life...

Re: Show HN: Wiv.js – A library for a more wiggly div

#16

That is amazingly cool. Not sure what I'd ever use it for, but it's awesome nonetheless!

It can be use for form validation. If user doesn't enter an input, we can "wiggle" it for 2 seconds (together with a red error message). Recently I did just that :)

Re: Show HN: Wiv.js – A library for a more wiggly div

#18

That is amazingly cool. Not sure what I'd ever use it for, but it's awesome nonetheless!

It can be use for form validation. If user doesn't enter an input, we can "wiggle" it for 2 seconds (together with a red error message). Recently I did just that :)

Aaaww, yeah. I like that idea a lot. I might just use that in a project I'm working on. Thanks for mentioning that!
Post reply on HN