How To Match Complex Element IDs In jQuery

Author: , July 22nd, 2021

PROBLEM: An element ID that looked like this would fail to match: service = east node = db1-demo.thedomain.com

SOLUTION: Rig any special characters in the complex hostname (:.[],-@) with a backslash in front of them to ensure proper matching: