MCPcopy Create free account
hub / github.com/unconed/TermKit / getVal

Function getVal

HTML/jquery.js:3240–3258  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

3238 var changeFilters,
3239
3240 getVal = function( elem ) {
3241 var type = elem.type, val = elem.value;
3242
3243 if ( type === "radio" || type === "checkbox" ) {
3244 val = elem.checked;
3245
3246 } else if ( type === "select-multiple" ) {
3247 val = elem.selectedIndex > -1 ?
3248 jQuery.map( elem.options, function( elem ) {
3249 return elem.selected;
3250 }).join("-") :
3251 "";
3252
3253 } else if ( jQuery.nodeName( elem, "select" ) ) {
3254 val = elem.selectedIndex;
3255 }
3256
3257 return val;
3258 },
3259
3260 testChange = function testChange( e ) {
3261 var elem = e.target, data, val;

Callers 2

testChangeFunction · 0.70
jquery.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected