Sha256: 77afa76b287c0b091a86117dfa3a88ad5c276f4536d7764a7dea9318eea36fc6
Contents?: true
Size: 582 Bytes
Versions: 61
Compression:
Stored size: 582 Bytes
Contents
Spider.defineWidget('Spider.Core.Forms.Form', { clear: function(){ $Form.clearForm(this.el); } }); $Form = { clearForm: function(form){ $(':input', form).each(function() { var type = this.type; var tag = this.tagName.toLowerCase(); // normalize case if (type == 'text' || type == 'password' || tag == 'textarea' || type == 'hidden') this.value = ""; else if (type == 'checkbox' || type == 'radio') this.checked = false; else if (tag == 'select') this.selectedIndex = -1; }); } };
Version data entries
61 entries across 61 versions & 1 rubygems