javascript - Using JSON to generate HTML elements, multiple class names and id. - Without JQuery -



javascript - Using JSON to generate HTML elements, multiple class names and id. - Without JQuery -

i've been building virtual rubik's cube on codepen using js , css only. - forgive me apparent stupidity, have been coding less 3 months, , less 1 month in js.

i have made 2 versions, version 3 need generate much of html possible using json , js loop structures. despite doing tonnes of reading on json, can't quite head around concept of using generate html have been standard js arrays. see codepen link-- http://codepen.io/peachey_a/pen/hecdh

whilst have used little bit of jquery add together class attributes in version 2; steer clear of in generation process goal understand js before getting involved libraries.

any advice of specific websites or code snippet examples appreciated.

thanks

as far manipulating json recommend using library (if browser doesn't back upwards natively), if trying away jquery should take @ http://youmightnotneedjquery.com/

javascript html css json rubiks-cube

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -