instantsearch.js

Chrome only displaying some images as webp

◇◆丶佛笑我妖孽 提交于 2021-01-29 08:58:12
问题 I've been working on converting images on my website to Webp to improve performance. Typically I'm using the following HTML to display them: <picture> <source srcset="/img/about/image.webp" type="image/webp"> <source srcset="/img/about/image.jpg" type="image/jpeg"> <img src="/img/about/image.jpg" alt="alt text"> </picture> Using the Lighthouse auditing feature in Chrome's Dev Tools and in the pagespeed insights I keep getting told that image could be served in next-gen formats despite the

Customising Algolia instantsearch searchbox and results

99封情书 提交于 2020-01-06 02:37:25
问题 I am building a service that uses Algolia instantsearch.js to display search results. Starting the project I created a template where I displayed our customers in a table. Then I wanted to add the functionality that the contents of the table change while a user is typing for a specific customer info (ex. mobile number). This is why I used Algolia and instantsearch.js to achieve this. I managed to have it working but I have a problem with styling the whole thing: The searchbox and hits widgets

Algolia instantsearch.js callback function

只愿长相守 提交于 2019-12-09 17:00:44
问题 I am using Algolia instantsearch.js as my site search. The setup process was rather easy and straightforward, including .js and .css files, creating templates and then create one more .js file with app() function for setting up my app (appId, apiKey, indexName) and widgets. What I need is a function that will execute each time a search function ran, preferably right after the hits are shown. Maybe there is a widget for that? Thanks! 回答1: You can listen the render event like described here, it

Algolia instantsearch.js callback function

萝らか妹 提交于 2019-12-04 05:24:55
I am using Algolia instantsearch.js as my site search. The setup process was rather easy and straightforward, including .js and .css files, creating templates and then create one more .js file with app() function for setting up my app (appId, apiKey, indexName) and widgets. What I need is a function that will execute each time a search function ran, preferably right after the hits are shown. Maybe there is a widget for that? Thanks! You can listen the render event like described here , it's an event triggered once all widgets have been rendered: var search = instantsearch({...}); search.on(