我正在尝试在网页上设置 prettyPhoto,但在此行上不断收到“对象不支持属性或方法‘prettyPhoto’”:
$("area[rel^='prettyPhoto']").prettyPhoto();
我认为问题是我不知道将这些脚本放在母版页的哪个位置
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="Content/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet"/>
<script src="Scripts/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
以及创建对象的脚本:
<script type="text/javascript" charset="utf-8">
$(document).ready(function () {
$("area[rel^='prettyPhoto']").prettyPhoto();
$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'normal', theme: 'light_square', slideshow: 3000, autoplay_slideshow: true });
$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'fast', slideshow: 10000, hideflash: true });
$("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',
changepicturecallback: function () { initialize(); }
});
$("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
custom_markup: '<div id="bsap_1259344" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div><div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
changepicturecallback: function () { _bsap.exec(); }
});
});
</script>
有谁知道如何使用母版页进行设置?我可以让它在独立的 .aspx 页面中工作,但我确实需要能够在母版页中使用它。
谢谢。