I'm a complete beginner doing the odin project working on a task and I've hit a wall and was wondering if anyone could help.
Essentially, I'm trying to make an etch a sketch using jquery and javascript, it can be found here:
http://zackvs.github.io/etchasketch/
source here:
https://github.com/zackvs/etchasketch
After clicking the play buton, the problem i'm having is:
I want to start a path in the middle of the canvas and so as a first step i'm trying to find the height and width of the canvas which i'm testing using:
"console.log($('#draw').width() + " x " + $('#draw').height);"
The console displays the width perfectly but for the height returns a v. long string which means absolutely nothing to me (starting with: "(d,e){var f=arguments.length&&(c||"boolean"!=typeof d)," etc etc).
Why is this happening?
I'm completely in over my head so any help would be appreciated, I've had a good old google but to no avail.
((Also as a sidenote I spent a lot of time trying to make the site resposive but on resizing the layout slowly comes out of line? I'm sure I've done the whole thing in a silly way with the percentages but how else can i do it?))
Thanks! sorry for long q but it's my first ever here.