问题
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