Building a similar setup to Twitters Follow/Unfollow button and can't quite get it working with jQuery. 

Complete so far;
 - jQuery on a single **known ID** for a `<button>` for updating all the details needed
 - API powering the server side logic
 - Everything else server side is working perfectly

Can't figure out;
 - How to expand the functionality I have for a single known ID to **multiple unknown IDs**. 

Here's the code I have working for the known single point;

```
//Update Links
                            $("#api-follow-button").html(buttonText);
                            $("#api-follow-button").attr("currentState", currentState);

```

The above code is wrapped in a function with a whole host of other code which is triggered by;

```
$(document).on("click", "#api-follow-button", followButton());

```

This works perfect as I know the ID. The challenge being, how to expand this when the ID that is to be updated is unknown? 

I've tested so many variations using `$(this)` and I'm not getting anything working. I'm sure I'm just missing something blindingly obvious here. 

So imagine this code as an example;

```
<button id="button-idxxx">Text 1</button>
<button id="button-idxxx">Text 2</button>
<button id="button-idxxx">Text 3</button>

```

Then whenever someone clicks on one of the `<button>`, then the 'Text X' would change to something else

Ideas?