holder.js

Holder.js doesn't work with turbolinks

断了今生、忘了曾经 提交于 2019-12-24 17:02:24
问题 Holder.js doesn't work with turbolinks. I'm getting empty images. It works when i press Ctrl+R. How to get them work together? 回答1: Use this script to run holder.js between requests: $(document).bind 'page:change', -> Holder.run() 回答2: For Rails 5 I had to use this: document.addEventListener('turbolinks:load', function() { Holder.run() }); See https://stackoverflow.com/a/18770589/1845011 and https://github.com/turbolinks/turbolinks#installing-javascript-behavior 来源: https://stackoverflow.com

Can't figure out how to use Bootstrap thumbnail component

邮差的信 提交于 2019-12-09 08:41:02
问题 I'm trying to use Bootstrap's thumbnail component to display a list of product categories with thumbnail images. I want users to click the thumbnails to go to the category. The documentation on the Bootstrap website provides this basic markup: <ul class="thumbnails"> <li class="span4"> <a href="#" class="thumbnail"> <img data-src="holder.js/300x200" alt=""> </a> </li> ... </ul> I've Googled for information about holder.js, found the official holder.js page, downloaded the zip version, put the

Can't figure out how to use Bootstrap thumbnail component

半腔热情 提交于 2019-12-03 11:12:57
I'm trying to use Bootstrap's thumbnail component to display a list of product categories with thumbnail images. I want users to click the thumbnails to go to the category. The documentation on the Bootstrap website provides this basic markup: <ul class="thumbnails"> <li class="span4"> <a href="#" class="thumbnail"> <img data-src="holder.js/300x200" alt=""> </a> </li> ... </ul> I've Googled for information about holder.js, found the official holder.js page, downloaded the zip version, put the files in my site's js folder and linked to the holder.js file with a script tag in my HTML. But how