Site icon Digging In

jQuery Selectors

Hogan’s Heroes used to have a routine where someone would be defusing a bomb, and someone else would be reading the instructions. “Cut the red wire. But first, cut the blue wire.”

Most of my jQuery bugs are around nailing the selector. I do a lot of dynamic concatenating of class names and id’s at the server; get it wrong in your JS and ugh…pain.

Lesson: make sure your selectors are right before cutting the red wire.

Exit mobile version