Using "this" to run Javascript function on different page elements

Text 1

Text 2

Text 3