简体   繁体   English

灯箱图库不适用于meteor.js

[英]Lightbox gallery not working with meteor.js

Did the steps 做了步骤

  1. Copied lightbox.css , lightbox-plus-jquery.min.js into my meteor project directory client/templates/layouts lightbox.csslightbox-plus-jquery.min.js复制到我的流星项目目录client / templates / layouts中

  2. image.html image.html

    <a href="{{url}}" data-lightbox="{{category}}" class="cbp-caption cbp-singlePageInline" data-title="World Clock Widget<br>by Paul Flavius Nechita">

  3. DefaultLayout.html is my project homepage located in client/templates/layouts DefaultLayout.html是我的项目主页,位于客户端/模板/布局

    Here in body <script src="lightbox-plus-jquery.min.js">< /script> included 在正文中<script src="lightbox-plus-jquery.min.js">< /script>
    Here in head <link rel="stylesheet" href="lightbox.css"> 在此处<link rel="stylesheet" href="lightbox.css">

But still when image is clicked it loads in traditional way. 但是,当单击图像时,它仍然以传统方式加载。
There is no lightbox gallery? 没有灯箱画廊? Please, suggest a way to integrate lightbox with meteor.js application. 请提出一种将灯箱与meteor.js应用程序集成的方法。

you need your lightbox js file to be loaded after all DOM elements in the body are loaded and with Meteor it isn't that simple. 您需要在加载了正文中的所有DOM元素之后加载lightbox js文件,而使用Meteor并不是那么简单。 You can try with: https://atmospherejs.com/juliancwirko/s-image-box for simple image popups. 您可以尝试: https : //atmospherejs.com/juliancwirko/s-image-box以获得简单的图像弹出窗口。 It is prepared for Meteor 为流星准备

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM