Pardon для этого, я просто получаю эту ошибку в консоли, но я не вижу ее? Я могу быть слепым в данный момент, кто-нибудь, пожалуйста, поможет мне устранить эту ошибку?отсутствует) после списка аргументов else {- я не вижу его?
говорит: "отсутствует) после списка аргументов еще {"
//run the function for all boxes
$(".box").each(function() {
var thisBox = $(this);
var url = thisBox.href;
var infoBox = $(".info", thisBox);
thisBox.data('height', $(this).height());
thisBox.click(function() {
if (!thisBox.hasClass("opened")) {
thisBox.addClass("opened");
$("img", box).fadeOut("slow", function() {
infoBox.css({
"visibility": "visible",
"height": "auto"
});
infoBox.load(url, function() {
$('.readMore', thisBox).click(function (e) {
e.preventDefault();
var selector = $(this).attr('data-filter-all');
$('#container').isotope({
filter: selector
});
$('#container').isotope('reloadItems');
return false;
});
$('<a href="#" class="closeBox">Close</a>"').appendTo(infoBox).click(function (e) {
e.preventDefault();
$("html, body").animate({
scrollTop: 0
}, 500);
$('#container').isotope('reLayout');
});
var newHeight = infoBox.outerHeight(true);
thisBox.css({
"width": "692",
"height": newHeight
});
infoBox.animate({
width: 692,
height: newHeight
}, function() {
$('#container').isotope('reLayout', function() {
Shadowbox.setup();
thisBox.removeClass("loading");
infoBox.css({
"visibility": "visible"
});
var videoSpan = infoBox.find("span.video");
iframe = $('<iframe/>', {
'frameborder': 0,
'class': 'tide',
'width': '692',
'height': '389',
'src': 'http://player.vimeo.com/video/' + videoSpan.data("vimeoid") + '?autoplay=0&api=1'
});
videoSpan.replaceWith(iframe);
});
});
});
}
else {
$(".info").empty();
$("img", thisBox).fadeIn("slow");
thisBox.css("width", "230");
thisBox.height(box.data('height'));
thisBox.removeClass("opened");
};
});
});
});
принадлежит на http://www.specsavers.co.uk/ –
Ваш редактор должен быть в состоянии свернуть разделы кода и пары изюминки фигурных скобок. Используйте это. –
@LightnessRacesinOrbit comment - лучший способ решить эту проблему, вы узнаете больше в конце. – xanderer