The r:jQuerySelector('id') function will perform nearly the same function as r:clientId('id') but will transform the resulting id into a jQuery id selector which means that it will add a "#" character at the beginning and escape all reserved characters in CSS selectors.