Однако функции animate() илиpulse() (если они не закомментированы) в mouseenter() также не работают.
Функцияpulse() предоставлена Джарродом Оверсоном...
http://jarrodoverson.com/static/demos/jquery.pulse.html
Код: Выделить всё
sectionTitle = $j(this).find(".sectionTitle");
sectionTitle.click(function(){
if($j(this).parent().height() == sections[$j(this).parent().attr("id")]["height"]){
origHeight = sections[$j(this).parent().attr("id")]["origHeight"];
$j(this).parent().animate({height:origHeight},"slow");
}else{
height = sections[$j(this).parent().attr("id")]["height"];
$j(this).parent().animate({height:height},"slow");
}
})
sectionTitle.mouseenter(function(){
var properties = { "color" : '#F00' };
// $j(this).pulse(properties, 500, 3);
$j(this).animate({"background-color":'#F00'},"slow");
})
http://fantasticvisions.net/test/me/
Заголовок раздела классов применяется к ряду элементов H2 на приведенной выше странице. Нажатие на них приведет к расширению содержимого с помощью jQuery animate(). Однако mouseenter() не работает.
Что мне здесь не хватает? Я попробовал ряд других вариантов этого, и ни один из них не сработал. Событие mouseenter() срабатывает, и код выполняется (я это отслеживал), но эффекта, похоже, никогда не происходит.
Подробнее здесь: https://stackoverflow.com/questions/100 ... for-colors
Полная версия