Every line of 'add attribute jquery' 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.
22 function addAttribute(attribute, value) { 23 var attributes = filterUrl.getQueryVar(attribute); 24 if (!attributes) { 25 attributes = value; 26 } else { 27 if (attributes.indexOf(value) == -1) { 28 attributes += ',' + value; 29 } 30 } 31 filterUrl = filterUrl.addQueryVar(attribute, attributes); 32 return filterUrl; 33 }
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
149 addAttribute(name: string, value: string = '') { 150 this.attrs.push(name, value && value.toLowerCase() || ''); 151 }