我现在已经约6个小时了.我通过几个Lint工具和各种其他在线测试处理它,我无法正确关闭以下声明.在最后一行产生了一个持续的错误,Lint说a}是必需的,我尝试过},}}}} w /和w/out的许多其他变体.以及2x 3x或更多右括号,括号和分号的许多其他变体.我检查并重新检查所有开始和结束语句,以确保它们匹配.我想我只是没有看到什么!
如果一双新眼睛可以看到这一点,看看我错过了什么,做错了什么.
(function ($) {
"use strict";
var slider = null;
$(document).on("mouseover", '.bb_menu_item', function () {
slider.stopAuto();
slider.goToSlide($(this).attr('index'));
});
$(document).on("mouseout", '.bb_menu_item', function () {
slider.startAuto();
});
$(document).ready(function () {
if ($('#bbSlider').length) {
slider = $('#bb_slider').bxSlider({
controls: false,
pager: false,
auto: true,
slideWidth: 1030,
responsive: true,
mode:"fade"
});
}
$('.tab-linker').click(function () {
window.location.href = 'http://t.com/?page_id=1302#tab-id-2';
//return false;
location.reload(false);
});
// Custom homepage slider
$(".slider-home").click(function (event) {
event.preventDefault();
window.location = "http://t.com/";
});
//
$(".slider-services").click(function (event) {
event.preventDefault();
window.location = "http://t.com/?page_id=1302";
});
//
$(".slider-gallery").click(function (event) {
event.preventDefault();
window.location = "http://t.com/?page_id=73";
});
//
$(".slider-about").click(function (event) {
event.preventDefault();
window.location = "http://t.com/?page_id=2";
});
//
$(".slider-contact").click(function (event) {
event.preventDefault();
window.location = "http://t.com/?page_id=1167";
});
//
$(".slider-links").click(function (event) {
event.preventDefault();
window.location = "http://t.com/?page_id=2565";
});
});
Run Code Online (Sandbox Code Playgroud)
鉴于你的程序开头(function() {(无压痕!),你将需要关闭IEFE用
}());
Run Code Online (Sandbox Code Playgroud)
最后(在现有});匹配之后$(document).ready(function () {).
| 归档时间: |
|
| 查看次数: |
56 次 |
| 最近记录: |