Yes, I know a little late to writing this one out but at least I am doing it. This last week I did manage to read up onthe
document.getElementsByClassName()
function a little bit and it was pretty neat. There are also a lot of other functions that I really need to read up on and practice with so I can really up my JavaScript game.
Now, there were a few things I did learn from it and the neatest thing was that it returns an array-like object. Yes, an object – because JavaScript wasn’t confusing enough without other objects.
Okay, that is beside the point but it is cool that you can manipulate a lot of the data from it. The reason I like it is that it is a step in not having to depend on third-party scripts for things like that. Having to not load up jQuery is a very good thing because it means one less script to load and one less server request. Even more so when all you need to do is get a single element with a class. For example, just the first element.
Another thing I did learn was being able to use
non-ASCII URLs in WordPress is super cool but can be a little frustrating as well. A lot of it is because of the encoding that needs to happen. What is nice is the functions
esc_url()
and
esc_url_raw()
do provide for this ability. The key thing is making sure they are used when they need to be.
As for work, I’ll be – again – focusing on bug fixes. The reason is I want to learn how things can break before taking on a feature. I am looking forward to this week even though it is a short work week.
Yes, I know a little late to writing this one out but at least I am doing it. This last week I did manage to read up onthe
document.getElementsByClassName()
function a little bit and it was pretty neat. There are also a lot of other functions that I really need to read up on and practice with so I can really up my JavaScript game.
Now, there were a few things I did learn from it and the neatest thing was that it returns an array-like object. Yes, an object – because JavaScript wasn’t confusing enough without other objects.
Okay, that is beside the point but it is cool that you can manipulate a lot of the data from it. The reason I like it is that it is a step in not having to depend on third-party scripts for things like that. Having to not load up jQuery is a very good thing because it means one less script to load and one less server request. Even more so when all you need to do is get a single element with a class. For example, just the first element.
Another thing I did learn was being able to use
non-ASCII URLs in WordPress is super cool but can be a little frustrating as well. A lot of it is because of the encoding that needs to happen. What is nice is the functions
esc_url()
and
esc_url_raw()
do provide for this ability. The key thing is making sure they are used when they need to be.
As for work, I’ll be – again – focusing on bug fixes. The reason is I want to learn how things can break before taking on a feature. I am looking forward to this week even though it is a short work week.