[jQuery] Selecting buttons fix

[jQuery] Selecting buttons fix

Gday
May I suggest the following for Jquery $.Select to allow for button tags as
well as the input type='button' class. Typically I would see this as zero
impact on most peoples existing code as they would use either input or
button and not both at the same time.
    case 'text': case 'radio': case 'checkbox': case 'hidden':
    case 'button': 'submit': case 'image': case 'password':
    case 'reset': case 'file':
        r = $.merge( $.grep( $.tag(o,"input"),
            function(a){ return a.type == m[2] }), r );
        if ( m[2]=='button') r = $.merge( $.tag(o,"button"), r );
    break;
    case 'input':
        r = $.merge( $.tag(o,"input"), r );
        r = $.merge( $.tag(o,"select"), r );
        r = $.merge( $.tag(o,"textarea"), r );
        r = $.merge( $.tag(o,"button"), r );
    break;
Just my 2.2c inc GST worth
Kent
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/























    • Topic Participants

    • kent