Я пытаюсь сделать новый дизайн для системы Summer Cart друга. Система обычно имеет появляющиеся / исчезающие меню подкатегорий, но затем я скачал плагин javascript под названием «лайтбокс», который показывает изображение в текущем окне, пока он сохраняет страницу, вместо того, чтобы открывать новое окно, где показывать изображение. Теперь проблема в том, что этот плагин «лайтбокс» имеет файл «prototype.js», который не работает подкатегориям ...
Prototype.js: http://www.mediafire.com/?sj3xzdw2gchmca0
Код, который заставляет подменю появляться / исчезать:
$(function () {
var stepOver = 20; // The number of pixels of the upper box that are going to cover its parent.
$("#DropdownCategories ul li").hover(
function () {
var firstUls = $(this).find('ul:first');
firstUls.show();
var positionLeft = $(this).position().left - stepOver + $(this).outerWidth();
var offsetLeft = $(this).offset().left - stepOver + $(this).outerWidth();
// Find the position that the box is going to end in.
var wouldEnd = offsetLeft + firstUls.outerWidth();
// If the box ends out of the body we move the box on the left side.
if (wouldEnd > $('body').innerWidth()) {
positionLeft = $(this).position().left - firstUls.outerWidth() + stepOver;
}
firstUls.css('position', 'absolute')
.css('top', $(this).position().top + 'px')
.css('left', positionLeft + 'px');
},
function () {
$(this).find('ul:first').hide();
}
);
});
Фактический сайт: http://www.sladurko.com/product/277/bluza-kas-rakav.html