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

Function getVal

HTML/external/jquery-ui/development-bundle/jquery-1.5.1.js:2871–2889  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

2869 var changeFilters,
2870
2871 getVal = function( elem ) {
2872 var type = elem.type, val = elem.value;
2873
2874 if ( type === "radio" || type === "checkbox" ) {
2875 val = elem.checked;
2876
2877 } else if ( type === "select-multiple" ) {
2878 val = elem.selectedIndex > -1 ?
2879 jQuery.map( elem.options, function( elem ) {
2880 return elem.selected;
2881 }).join("-") :
2882 "";
2883
2884 } else if ( elem.nodeName.toLowerCase() === "select" ) {
2885 val = elem.selectedIndex;
2886 }
2887
2888 return val;
2889 },
2890
2891 testChange = function testChange( e ) {
2892 var elem = e.target, data, val;

Callers 2

testChangeFunction · 0.70
jquery-1.5.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected