jQuery selectors can be a bit tricky.
:first-child, :last-child, nth-of-type, is it zero-based, why is it grabbing that element when I expected this one. Fun stuff.
On a recent project, I needed to find an anchor tag by its href so I could then replace it with my own URL… and that got me thinking about jQuery selectors again.
So, let’s run through some and try to clear up some confusion. Here’s this week’s Tech Tutorial:
And, if you’d give me a likey-like I’d sure appreciate it!
P.S. If you liked the show, give it a like and share with the communities and people you think will benefit. And, you can always find all my tutorials, podcast episodes and more on johnmorrisonline.com, @jpmorris on Twitter and youtube.com/johnmorrisvideo.
Subscribe to the Podcast