results.size is not a function
See original GitHub issueHi there,
thanks you for this plugin. I have updated it to version 0.5.0 in my theme but when trying to search I’m getting the following error:
Uncaught TypeError: results.size is not a function at Object.<anonymous> (jquery.ghosthunter.js?v=79caedeb82:3478)
HTML:
<form class="search-form">
<input type="text" id="search-field" class="search-field" placeholder="Type your keywords…" />
<input type="submit" class="search-submit" value="Search" />
</form>
<div id="search-results" class="search-results"></div>
jQuery code:
var searchField = $('#search-field').ghostHunter({
results : "#search-results",
onKeyUp : true
});
Can you help to fix it? Thank you.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Uncaught TypeError: $(...).size is not a function - Stack Overflow
After replacing size() with length , it turned out that the actual problem is reference to non-existnent element. This implies that undefined is ......
Read more >Uncaught TypeError: $(…).size is not a function - WordPress.org
From the console, activating the lightbox results in the error: Uncaught TypeError: $(…).size is not a function jquery.prettyPhoto.js:193:32.
Read more >jQuery(...).size is not a function - Feedback - #sentry
size is not a function” and what is bad about that is that it is impossible to reproduce, even if there is no...
Read more >Result of size() function could not be used in a for loop in ...
I get the number of images a ImageCollection using the size() function, but when I use that number in a for loop, it...
Read more >.size() | jQuery API Documentation
Description: Return the number of elements in the jQuery object. version added: 1.0.size(). This method does not accept any arguments.
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 did a typo when committing 7e0f675 I did a hotfix just now but I won’t be able to test until this weekend. If you’ve got free time, try the latest commit, otherwise revert to 0.4.0 until I finish ironing this out.
Sorry about this
Ah.
$().size()
is deprecated. Looks like we can just use$().length
there.