This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* id is the id tag of <input/> element | |
type is the type you want to change it to. | |
jQuery is required and assumed to be the jQuery variable */ | |
function changeType(id, type) { | |
var x = jQuery("#"+id); | |
if(x.attr('type') == type) | |
return x; //That was easy. | |
try { | |
return x.attr('type', type); //Stupid IE security will not allow this | |
} catch(e) { |