Use EscapeSelector function to prevent possible problems with special characters in attribute ids.