MCPcopy Index your code
hub / github.com/dataarts/dat.gui / getVal

Function getVal

tests/jquery.js:3309–3328  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

3307 var changeFilters,
3308
3309 getVal = function( elem ) {
3310 var type = jQuery.nodeName( elem, "input" ) ? elem.type : "",
3311 val = elem.value;
3312
3313 if ( type === "radio" || type === "checkbox" ) {
3314 val = elem.checked;
3315
3316 } else if ( type === "select-multiple" ) {
3317 val = elem.selectedIndex > -1 ?
3318 jQuery.map( elem.options, function( elem ) {
3319 return elem.selected;
3320 }).join("-") :
3321 "";
3322
3323 } else if ( jQuery.nodeName( elem, "select" ) ) {
3324 val = elem.selectedIndex;
3325 }
3326
3327 return val;
3328 },
3329
3330 testChange = function testChange( e ) {
3331 var elem = e.target, data, val;

Callers 2

testChangeFunction · 0.85
jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…