Nice css buttons with indexing

by Annie Lagang

HTML

<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"><div class="ui-dialog-buttonset" style="float: left;"><button type="button" role="button" aria-disabled="false" style="width: 135px; height: 35px; background-color: rgb(238, 238, 238); border: 1px solid rgb(192, 192, 192); color: rgb(51, 102, 204); font-weight: bold; background-position: initial initial; background-repeat: initial initial;" class=""><span class="ui-button-text">CHANGE EMAIL</span></button><button type="button" role="button" aria-disabled="false" style="border: white; background-color: white; color: rgb(51, 102, 204); font-weight: bold; padding: 0px 20px; background-position: initial initial; background-repeat: initial initial;" class=""><span class="ui-button-text">CANCEL</span></button></div></div>

JavaScript

$(function(){
    $(".ui-dialog-buttonset").children().each(function(index){
        var offset = 10;
        $(this).attr("tabindex", offset + index)
        alert($(this).attr("tabindex"))
    });
});