You're using the $("#HubMessages") all over, save the reference and re-use the reference.  Do the same with $("#ConnectionsList")