I been thinking, when do i start to use java script. What do i use it for. It feels like everyone uses it!
Now that I'm coding the gallery, i think i need to use it!!
I'm so exited! :D
1/2 Personally I use javascript when I want to have a lot of elements in my code that are the same. For example in my "culture logs" I basically just have a bunch of divs with a background, a name, sometimes a description. They all do the same thing so it's easier to use javascript (and json, I just love json) to write all that code for me. I also use it to count how many of those items are books, or movies,
2/2 etc. so when I add a new item I don't have to manually count it. I think it's called DOM manipulation and to me it is the most useful use of JS. There is obviously many other things you can do, but yeah... For my gallery I have json file, each "post" has a url, a date and a description if I want and then my javascript writes it all for me
1/2 Personally I use javascript when I want to have a lot of elements in my code that are the same. For example in my "culture logs" I basically just have a bunch of divs with a background, a name, sometimes a description. They all do the same thing so it's easier to use javascript (and json, I just love json) to write all that code for me. I also use it to count how many of those items are books, or movies,
2/2 etc. so when I add a new item I don't have to manually count it. I think it's called DOM manipulation and to me it is the most useful use of JS. There is obviously many other things you can do, but yeah... For my gallery I have json file, each "post" has a url, a date and a description if I want and then my javascript writes it all for me