我在我的 asp.net 应用程序中使用 nivo jquery 图像滑块,但是在页面加载后它不会更改图像并且只显示“loading.gif”图像,在 jquery 调试时我收到错误消息:$('#slider')。 nivoSlider(); 不是函数。
<link href="css/NivoSlideThemes/default/default.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/NivoSlideThemes/nivo-slider.css" rel="stylesheet" type="text/css" media="screen" />
<script src="js/menu/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="js/jquery.nivo.slider.pack.js" type="text/javascript"></script>
<script type="text/javascript">
$(window).load(function () {
$('#slider').nivoSlider();
});
</script>
<style>
.theme-default #slider {
margin:1px auto 0 auto;
width:674px; /* Make sure your images are the same size */
height:311px; /* Make sure your images are the same size */
}
.theme-pascal.slider-wrapper,
.theme-orman.slider-wrapper {
/* margin-top:150px; */
}
.clear {
clear:both;
}
</style>
<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<img src="images/cfgSliderImages/1.gif" alt="" />
<img src="images/cfgSliderImages/2.gif" alt="" title="Solar Power" />
<img src="images/cfgSliderImages/3.gif" alt="" data-transition="slideInLeft" />
<img src="images/cfgSliderImages/4.gif" alt="" title="#htmlcaption" />
</div>
<div id="htmlcaption" class="nivo-html-caption">
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div>
</div>