question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught TypeError: this.input.setAttribute is not a function

See original GitHub issue

Uncaught 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Etheriancommented, May 21, 2016

I see. Awesomplete defines its own internal $ function. The trouble was that I was accidentally feeding it a jQuery object.

1reaction
LeaVeroucommented, May 21, 2016

Awesomplete doesn’t use jQuery. The $() method is returning an element.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found