$("#elmID") selects elements by ID which is fastest since it maps directly to getElementById. $(".myCSSClass") selects by class which is slower since it requires DOM traversal. For performance, combine multiple selections and property changes into one statement, and put most specific selectors like IDs first.