我希望在页面加载后脚本运行时,单击锚标记来调用脚本。如果我在点击功能上写它。这会将错误视为" Uncaught TypeError: object is not a function
"
对该滑块的参考是 http://www.basic-slider.com/
<script class="secret-source">
jQuery(document).ready(function ($) {
jQuery('#jquerySliderClick').click(function ($) {
debugger;
$('#banner-slide').bjqs({
animtype: 'slide',
height: 160,
width: 1000,
responsive: true,
randomstart: true
});
});
});
</script>
答案 0 :(得分:0)
嗨〜我想帮助你,但我不会说英语。^^; mm ..我改变了你的scoure ...... 但我无法通过点击找到目标(id =&#34; jquerySliderClick&#34;) 再次检查您的代码
<div id="myModel4" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static"> <div class="modal-dialog mdal-wdh-Slider"> <div class="modal-content" style="border: 3px solid #428BCA; top: 150px" id="mc1"> <div class="modal-header"> <h4 class="modal-title" id="myModalLabel2"> <div class="hdng-4 center">Announcements</div> </h4> </div> <div class="modal-body"> <div id="banner-slide" style="width:100%;"> <ul class="bjqs"> <li>Hi All This is the first slider</li> <li>Hi All This is the Second slider</li> <li></li> </ul> </div> <script class="secret-source"> jQuery(document).ready(function($){ jQuery('#jquerySliderClick').click(function($){ $('#banner-slide').bjqs({ animtype: 'slide', height: 160, width: 1000, responsive: true, randomstart: true }); }); }); </script> <div> <input type="checkbox" id="chknotification" name="notification" style="margin-top:-2px;" /> <span style="padding-left:11px;">Dont Show me notification on next visit.</span> </div> <div class="center"> <input type="submit" value="Close" id="btnClose" class="btn btn-primary blu-bt" /> </div> </div> </div> </div> </div>