```
 <button class="btn btn-primary" onclick="wavesurfer.playPause()" type="button">
<span class="glyphicon glyphicon-play"></span></button>

```

When I press this button I want the span class to change:

From: `class="glyphicon glyphicon-play"`

To: `class="glyphicon glyphicon-pause"`

<http://jsfiddle.net/fnfNm/35/> Ive looked att this example but it doesnt have a class before it changes. 

Please give me jsfiddle example.