I have a button with a onclick attribute which is pointing to the function test().
test()
Button 1 <
Here is your solution jsfiddle , using jquery.
1 2 3