0
網站製作與使用jQuery v.2.1.4和prettyPhoto畫廊與jQuery的v.1.7.1作品作品引導傳送帶工作。無法找到解決我的問題,noConflict是不是爲我工作 - 這裏是代碼,我如何試圖發動js文件:noConflict是不以任何方式我試圖
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta http-equiv= "X-UA-Compatible" content="IE=edge" >
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/prettyPhoto.css" rel="stylesheet">
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="/js/jquery.easing.js"></script>
<script src="/js/galleryScript.js"></script>
<script src="/js/jquery.prettyPhoto.js"></script>
<script src="/js/jquery-1.7.1.min.js"></script>
<script src="/js/jquery-2.1.4.js"></script>
</head>
<body>
<% include partials/template/header.ejs %>
<div class="mainMargin">
<% include partials/template/nav.ejs %>
<% include partials/template/slider.ejs %>
<% include partials/content/main.ejs %>
</div>
<% include partials/template/footer.ejs %>
</body>
</html>
這裏是activeate插件的js代碼:
var jq162 = jQuery.noConflict(true);
jQuery(document).ready(function($)
{
function lightboxPhoto()
{
jQuery("a[rel^='prettyPhoto']").prettyPhoto({
animationSpeed: 'fast',
slideshow: 1000,
theme: 'facebook',
show_title: false,
overlay_gallery: false
});
}
if(jQuery().prettyPhoto)
{
lightboxPhoto();
}
});
您是否嘗試過使用prettyPhoto只用jQuery的v.2.1.4? – alan0xd7
這是我第一次認爲)))首先是隻有一個jQuery版本,比我認爲使用兩個noConflict,但它沒有wiork,我使用nodeJs,也許它可能是問題? –