Find an element by partial ID in jQuery? [duplicate]

Solution 1:

You could use the "Attribute Contains Selector":

$('[id*="_moComments_"]')

However you'd probably be better off by simply adding a class or a custom [data-*] attribute and selecting based on that.