Не работает JS

R
На сайте с 20.03.2011
Offline
13
355

Уважаемые, подскажите как быть...

Жила себе страничка с подключенным jQuery и парой мелких скриптов

// Скрипт выравнивания высоты блоков

var maxheight = 0;
var height = 0;

for(var i=0; i < $("#newSales .itemSales").length; i++){
height = $("#newSales .itemSales").eq(i).height();
if(height > maxheight) maxheight = height;
}
$("#newSales .itemSales").height(maxheight);

for(var i=0; i < $("#newSales .itemSales").length; i++){
height = 0;
height += $("#newSales .itemSales").eq(i).children("figure").height();
height += $("#newSales .itemSales").eq(i).children(".title").height()+13;
height += $("#newSales .itemSales").eq(i).children(".infoBlock").height()+10;
$("#newSales .itemSales").eq(i).children(".description").height(maxheight-height);
}

все работало. Стоило мне подключить lightbox2 с его библиотекой prototype и сразу вылезли ошибки.

Сannot read property 'length' of null

Конфликт функций jQ vs Prototype. Как быть?

V
На сайте с 05.01.2011
Offline
23
#1

используй jquery

$.noConflict():

R
На сайте с 20.03.2011
Offline
13
#2
veterinar:
используй jquery
$.noConflict():

Спасибо за ответ.

Уже решил нагуглив такую же галерею только на jQuery=)

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий