// Add this code anywhere you want (after jQuery has been loaded).
// Edit it to add your own expressions.
jQuery.extend(jQuery.expr[':'], {
///////////////////////////////////////////////////////////
// form elements that are submitable based on these criteria
// element is not disabled
// element has a selected or checked attribute
// element is a textarea
// element is an input of type text or hidden
//
// @usage: $(':submitable')
// @usage: $('#myForm :submitable')
submitable: function(a) {
return !a.disabled&&(a.selected||a.checked||(a.nodeName.toUpperCase()=='TEXTAREA')||(a.nodeName.toUpperCase()=='INPUT'&&(a.type=='text'||a.type=='hidden'||a.type=='password')));
},
///////////////////////////////////////////////////////////
// elements that have a type attribute not equal to hidden
// use if you want to select all input elements that are not hidden
// @usage: $('input:nothidden')
nothidden: function(a) {
return a.type&&a.type!='hidden';
}
})