var a = $('.step'); var max = a[0].href.match(/max=(\d+/)); a[0].href=a[0].href.replace(/&max=\d+/)+'&max='+(parseInt(max[1])+1)