10 examples of 'jquery clear array' in JavaScript

Every line of 'jquery clear array' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
189function clear(elem) {
190 while(elem.lastChild)
191 removeNode(elem.lastChild);
192}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

39clear: function Captcha_clear() {
40 document.documentElement.removeClass("overlay-required");
41 document.body.removeClass("overlay-required");
42
43 var captchaOverlay = $(".captcha");
44 if (captchaOverlay) {
45 captchaOverlay.remove();
46 }
47},
42function clear(o)
43{
44 var t = o.text;
45 setTimeout(function()
46 {
47 if (o.text == t)
48 {
49 o.text = "";
50 }
51 },1000);
52}
535Array.prototype.clear = function Array$clear() {
536 this.length = 0;
537}
18function cloneArray(arr) {
19 var len = arr.length, a = new Array(len);
20 for(var i = 0; i < len; i++) { a[i] = arr[i]; }
21 return a;
22}
228function clearForm(formId){
229 var form = jQuery('#'+formId);
230 jQuery.each(form[0].elements, function(key, val){
231 if(form[0].elements[key].type == 'text') {
232 form[0].elements[key].value = '';
233 }
234 });
235}
258clearElement: function clearElement (el) {
259 for (var i = el.childNodes.length - 1; i >= 0; i--) {
260 el.removeChild(el.childNodes[i]);
261 }
262},
220function clearForm($form)
221{
222 $form.find(':input').not(':button, :submit, :reset, :hidden, :checkbox, :radio').val('');
223 $form.find(':checkbox, :radio').prop('checked', false);
224}
32function arrayRemove(array,val) {
33 var index = array.indexOf(val);
34 if (index > -1) {
35 array.splice(index, 1);
36 }
37};
150function clear(fn) {
151 FamousEngine.removeListener(_event, fn);
152}

Related snippets