<script> function showSomething() { $('#first-link-class').class/* addClass? */('another-link-class'); } </script> <a onclick="showSomething()">Показать</a> <b onclick="showSomething()">Показать</b>