r/javascript • • Sep 02 '15

HTML5 Deck of Cards. 100% vanilla JS.

http://pakastin.github.io/deck-of-cards/
368 Upvotes

185 comments sorted by

View all comments

Show parent comments

1

u/memeship Sep 02 '15

Also curious why you're using dollar signs in front of element variables. Just trying to imitate the look of jQuery or what?

0

u/ToucheMonsieur Sep 03 '15

Also curious why you're using dollar signs in front of element variables. Just trying to imitate the look of jQuery or what?

Most likely a style choice.

1

u/memeship Sep 03 '15

Oh I agree on that one. I also prefix stored jQuery objects. But he's not using jQuery, so it doesn't exactly make sense here in that context.

2

u/pkstn Sep 03 '15

I tend to prefix references to DOM elements because I want to separate view objects from DOM elements.. jQuery doesn't own the dollar sign in any way :)