How to use multiple jQuery Plugins in one File

南笙酒味 提交于 2019-12-11 14:59:29

问题


I have to use jCarousel and Lightbox plugin both together in a file of php. the jCarousel is working fine for the light box all paths are correct but it always says that

 $("#gallery a").lightbox is not a function. 

Same as for fancy box or how do I can use Lightbox2 of prototype with jQuery.

I used the below for no conflict

var $jx = jQuery.noConflict();
$jx(function() {
   $jx(".jgallery").jCarouselLite({
         btnNext: ".morePost",
   visible: 8,
   scroll:8   

 });

for using with prototype. The Prototype Light Box Start working but jCarousel does not work after this.


回答1:


You can use light box as a jquery plug-in or light box2 also as a jquery plug-in.

The light that follow have the steps needed to make it work.

JQuery Light box:

http://leandrovieira.com/projects/jquery/lightbox/

JQuery Light box2:

http://www.huddletogether.com/projects/lightbox2/



来源:https://stackoverflow.com/questions/3758438/how-to-use-multiple-jquery-plugins-in-one-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!