the tab order should be given by the tabindex attribute, if present;
so the selectable array should be ordered.
something like this:
function selectNextTabbableOrFocusable(selector){
var selectables = $(selector);
selectables.sort(function(a, b){
var a1=$(a).attr('tabindex')||0;
var b1=$(b).attr('tabindex')||0;
return a1-b1;
} );
..... etcetera
the tab order should be given by the tabindex attribute, if present; so the selectable array should be ordered. something like this:
RIc