Comments (11)
Ah. $().size()
is deprecated. Looks like we can just use $().length
there.
from ghosthunter.
... 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
from ghosthunter.
from ghosthunter.
I've tried not setting up the option and leaving the default value, as in the code in my previous comment. And also, tried to set the result_template option like this:
result_template : '<a id="gh-{{ref}}" class="gh-search-item" href="{{link}}"><div class="result-title">{{title}}</div><div class="result-date">{{prettyPubDate}}</div></a>'
from ghosthunter.
Also, forgot to mention that I am using jQuery 3.3.1.
from ghosthunter.
Changing $().size()
to $().length
fixed this. Thank you, @fbennett !
from ghosthunter.
Should we update that directly in the source repo then ? if we start requiring specific versions of jQuery things are going to get interesting.
from ghosthunter.
After checking the docs it's been deprecated since 1.8... changed, issue closed.
from ghosthunter.
Even with commit 7e0f675 results are broken on my side:
TypeError: results.length is not a function (jquery.ghosthunter.js:3478:15)
My environment:
- Ghost 1.21.3
- jQuery v3.3.1
My index.js
:
/* Search with ghostHunter */
$("#search-field").ghostHunter({
results : "#search-results",
includepages : true,
onKeyUp : true,
onPageLoad : true,
info_template : "<p>{{amount}} article(s) trouvé(s)</p>",
result_template : "<a id='gh-{{ref}}' class='gh-search-item' href='{{link}}'><p>{{title}}</p></a>"
});
My page-search.hbs
:
from ghosthunter.
@Windyo At least with 7a058da it displays results, that's all I need for now, thank you for that quick fix. ;)
from ghosthunter.
Considering this closed seeing as I use that version also and I haven't seen any issues
from ghosthunter.
Related Issues (20)
- Arabic or Persian is not working! HOT 1
- Use result of search as filter of posts.
- Month names are hard-coded in English
- Serialization?
- Subpath bug
- GhostHunter in Nuxt.js
- Archive Repo HOT 4
- Plans to support v2 Content API? HOT 9
- Featured Image support needed. HOT 2
- getting posts url is hardcoded HOT 1
- ghost v3 support HOT 2
- Not working HOT 1
- MOBILE ONLY - Uncaught TypeError: Cannot read property 'query' of null HOT 2
- Fix of pubDate is not in dist version
- Use a tag or create a release when publishing new versions
- total query result are 11 but shows only 2, searching again shows all results HOT 3
- Different results locally and on production
- 2 search forms, 1 result section "Uncaught TypeError: Cannot read property 'query' of undefined" HOT 4
- unable to render {{tag}} in result template
- Sort order
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghosthunter.