我分别写了两个,但是如何合并?
只要按回车,或,单击鼠标,即可继续执行。
JS code:
< script type = "text/javascript" > $(document).keyup(function(event) {
if (event.keyCode == 13) {
jQuery(function($) {
$('#single_slide_show_wrapper').addClass('slideshow_already_start');
$("video").prop('muted', true); // if is home page
$('.slider_wrapper').unslider({
speed: 500,
// The speed to animate each slide (in milliseconds)
delay: false,
arrows: true,
fluid: true,
keys: true,
dots: true,
complete: function() {}
});
});
}
});
jQuery(function($) {
// Open Drawer On Top
$('#start').click(function() {
$('#single_slide_show_wrapper').addClass('slideshow_already_start');
$("video").prop('muted', true); // if is home page
$('.slider_wrapper').unslider({
speed: 500,
// The speed to animate each slide (in milliseconds)
delay: false,
arrows: true,
fluid: true,
keys: true,
dots: true,
complete: function() {}
});
});
});
< /script>
非常感谢!
补充下,按钮id是#start
不行诶~~~报错
追答报什么错