If you use a button with an identifier, you will not need to get additional data from the rel attribute, since the function is unique to your button.
But if you have other reasons, you just need to make sure that your button itself has a certain rel attribute, for example.
<input id="forwardStep" rel="test" type="button" value="forward" />
and your function is closed correctly
$(document).ready(function(){ $('#forwardStep').bind('click',function(){ var page = $(this).attr('rel'); alert(page); }) })
Mottie
source share