Did the steps
-
Copied lightbox.css ,lightbox-plus-jquery.min.js into my meteor project directory client/templates/layouts
将lightbox.css,lightbox-plus-jquery.min.js复制到我的meteor项目目录client / templates / layouts
-
image.html
<a href="{{url}}" data-lightbox="{{category}}" class="cbp-caption cbp-singlePageInline" data-title="World Clock Widget<br>by Paul Flavius Nechita">
-
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
Here in head<link rel="stylesheet" href="lightbox.css">
这里在body
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.
但是,当点击图像时,它仍以传统方式加载。没有灯箱画廊?请建议一种将lightbox与meteor.js应用程序集成的方法。
1 个解决方案
#1
0
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. You can try with: https://atmospherejs.com/juliancwirko/s-image-box for simple image popups. It is prepared for Meteor
你需要在加载正文中的所有DOM元素后加载lightbox js文件,并且使用Meteor并不是那么简单。您可以尝试使用:https://atmospherejs.com/juliancwirko/s-image-box获取简单的图像弹出窗口。它是为Meteor准备的
#1
0
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. You can try with: https://atmospherejs.com/juliancwirko/s-image-box for simple image popups. It is prepared for Meteor
你需要在加载正文中的所有DOM元素后加载lightbox js文件,并且使用Meteor并不是那么简单。您可以尝试使用:https://atmospherejs.com/juliancwirko/s-image-box获取简单的图像弹出窗口。它是为Meteor准备的