Question: Let's say I want that every time the user click any link an alert pops up that says "hohoho". 
Do I need to add `onclick="alert('hohoho')"` to every link or can I set this with CSS so that it works with every link?

Answer: 
You could do it with jQuery.

```
$('.myClass').click(function() {
  alert('hohoho');
});

```
Many 3rd party JavaScript libraries allow you to select all elements that have a CSS class of a particular name applied to them. Then you can iterate those elements and dynamically attach the handler.

There is no CSS-specific manner to do this.

In [JQuery](http://jquery.com/), you can do:

```
$(".myCssClass").click(function() { alert("hohoho"); });

```