The for loop should be inside jq.find, not outside. jq.find is an expensive DOM operation.