Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery prettypto不';不要在其他页面上工作_Jquery_Html_Prettyphoto - Fatal编程技术网

Jquery prettypto不';不要在其他页面上工作

Jquery prettypto不';不要在其他页面上工作,jquery,html,prettyphoto,Jquery,Html,Prettyphoto,我对Pretto有问题。它在我的另一个名为:portfolio.html的页面上运行良好。 在Index.html中,我还想让一些图像与PrettyTo一起工作,但它对代码没有响应。我有这个: 在my index.html的顶部: <script type="text/javascript" src="js/jquery.prettyPhoto.js"></script> 中间: <div class="boxA">

我对Pretto有问题。它在我的另一个名为:portfolio.html的页面上运行良好。 在Index.html中,我还想让一些图像与PrettyTo一起工作,但它对代码没有响应。我有这个:

在my index.html的顶部:

<script type="text/javascript" src="js/jquery.prettyPhoto.js"></script>

中间:

  <div class="boxA">
                <a href="images/images/barn_owl.jpg" data-rel="prettyPhoto" title="This is the description"><img class="bottom" src="images/knop-hover1.jpg" />
                <img class="top" src="images/knop-1.jpg" /></a>
    </div>
            <div class="boxB">
            <a data-rel="prettyPhoto" href="images/images/siamang.jpg"><img class="bottom" src="images/knop-hover-siamang.jpg" />
              <img class="top" src="images/knop-siamang.jpg" /></a>
    </div>
            <div class="boxC">
                <a href="portfolio-cover.html"><img class="bottom" src="images/knop-hover-cover.jpg" />
              <img class="top" src="images/knop-cover.jpg" /></a>
            </div>

底部:

<script>
//prettyPhoto 
jQuery(document).ready(function(){
    jQuery('a[data-gal]').each(function() {
        jQuery(this).attr('rel', jQuery(this).data('gal'));
    });     
    jQuery("a[data-rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'light_square',slideshow:false,overlay_gallery: false,social_tools:false,deeplinking:false});
}); 


</script> 

//普雷托
jQuery(文档).ready(函数(){
jQuery('a[data gal')。每个(函数(){
jQuery(this.attr('rel',jQuery(this.data('gal'));
});     
jQuery(“a[data rel^='prettypto']).prettypto({animationSpeed:'slow',theme:'light\u square',slideshow:false,overlay\u gallery:false,social\u tools:false,deeplinking:false});
}); 

如果有人知道怎么做,我希望你能帮助我。Thnx.

1)您记得在index.html中包含jQuery吗?2) 当您导航到index.html时,javascript控制台会输出什么?是否包含jQuery?您使用的是哪个版本的PrettyTo和jQuery?-我今天刚刚与Prettypto合作,发现最新版本的Prettypto与最新版本的jQuery不太兼容:)@EsbenBoye Jacobsen我确实在index.html中包含了下面的jQuery。这个版本是3.1。5@JosephMarikle我不明白你的意思(对不起,我的英语不是很好)。我已经将jQuery导入了我的index.html。它位于页面底部。好的,那么(根据我的测试)您应该使用jQuery 1.8.3或更低版本。。。否则将出现错误
未捕获类型错误:无法读取未定义的属性“msie”: