I want to change the value to the next number on each click...once it reaches the end it repeats from beginning...
html:
<button id="button">Click me</button>
<br />
<br />
<div id="info"></div>
javascript:
var arr = [10001, 10302, 12303, 11004, 10044];
$(document).on('click', '#button', function() {
$.each(arr, function(key, val) {
$('#info').text(arr[key]);
});
return false;
});