In the latter selector, .
is used to denote a class. So it's looking for the .followed_on
class, which it obviously doesn't find and so nothing is matched.
In order to fix this, I think you should escape the dot with a double-backslash:
$("#updates-pane-user\\.followed_on")
According to the jQuery docs:
To use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[]^`{|}~ ) as a literal part of a name, it must be escaped with with two backslashes: \\. For example, an element with id="foo.bar", can use the selector $("#foo\\.bar").
In general, try not to use periods or other special characters in your IDs to avoid confusion all around. "Allowed" is not the same as "good practice."