Uncaught TypeError: this.input.setAttribute is not a function
See original GitHub issueUncaught TypeError: this.input.setAttribute is not a function?
<input data-list="CSS, JavaScript, HTML, SVG, ARIA, MathML" data-multiple />
new Awesomplete($('input[data-multiple]'), { filter: function(text, input) { return Awesomplete.FILTER_CONTAINS(text, input.match(/[^,]*$/)[0]); },
replace: function(text) {
var before = this.input.value.match(/^.+,\s*|/)[0];
this.input.value = before + text + ", ";
}});`
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
element.setAttribute is not a function - Stack Overflow
when using querySelectorAll(), treat this as an array, you need a 'for loop' to step through the different elements. eg. var link =...
Read more >Uncaught TypeError on setting attribute in JavaScript
In this approach, you may get an Uncaught TypeError saying “elem.setAttribute is not a function”. This happens because you are trying to ...
Read more >error a.setAttribute is not a function with jquery 1.4.4
What I'm saying in my first post is that the code which implements the .attr() method in the jquery library seems to be...
Read more >setAttribute() not working - JavaScript - SitePoint Forums
If yours is not working, make sure b is really an element and selecting the right thing. 1 Like. jcarlisle2 November 22, 2017,...
Read more >MathJax and "t.setAttribute is not a function"
Uncaught (in promise) TypeError: t.setAttribute is not a function at l. ... If your [sic] are using javascript to process mathematics, and need...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see. Awesomplete defines its own internal $ function. The trouble was that I was accidentally feeding it a jQuery object.
Awesomplete doesn’t use jQuery. The
$()
method is returning an element.