More on This & Siblings
I’m obsessed with this, now that I understand how to better use it to my advantage.
I’m even more obsessed with using it with it’s siblings. I wrote a blog post the first time I tried this and siblings on my portfolio website, here, but I’m back with an update on how I took what was 10 lines of code x how many authors we were adding to a landing page, currently the code was sitting at 30 lines and soon another author was going to be added, 40 lines.
The original code (that lives on this page) looks like this:
I also used nth-child and index(); and some variables to tell it which menu item was clicked on and what article (author section) it relates to to show that one and not the others. The index starts at 0, but my author articles start at 1, therefore (line 540) I had to add a 1 to my menu index.
I am really happy that I was able to figure this out for myself with the help of google and my notebook, which looks like a rambling mess of dots and single quotes.
Okay bye! You can find me on twitter @erkdonovan