Нужна помощь с jQuery animate
Здравствуйте, уже деилька недель Борус с одной проблемой, и нигде не могу найти решение.
Хочу сделать анимацию, вот код: jQuery('.button_next_latest, .button_prev_latest, #main_latest').hover( function(){ jQuery('.button_prev_latest').fadeTo(400, 1); }, function() { jQuery('.button_prev_latest').fadeTo(400, 0.2); }).hover( function(){ jQuery('.button_next_latest').fadeTo(400, 1); }, function() { jQuery('.button_next_latest').fadeTo(400, 0.2); }); jQuery('.button_next_latest').click(function() { jQuery('ul#holder_latest').animate({scrollLeft: jQuery("ul#holder_latest").get(0).scrollLeft+643},700); }); jQuery('.button_prev_latest').click(function() { jQuery('ul#holder_latest').animate({scrollLeft: jQuery("ul#holder_latest").get(0).scrollLeft-643},700); }); Код html: <ul id="holder_<?php echo $tovar;?>"> <?php foreach ($list as $item) : ?> <li><table><tr><td style="height: 140px;" width="135px" rowspan="2"> <a class='imagesize' onclick='return hs.expand(this)' href='<?php echo $item->fullimage; ?>'> <img src="<?php echo $item->pimage; ?>" <?php $size = getimagesize($item->pimage); $img = $size['0'] / $size['1']; if ($img > 1) { echo 'width="135px"';} else { echo 'height="135px"'; } ?> alt="<?php echo $item->pname; ?>"/></a></td> <td width="150px"><div class="holder_title"><?php echo $item->pname; ?></div><br /> <div class="holder_price">Ціна: <?php echo $item->price; ?> <?php echo $item->currency; ?></div></td></tr><tr> <td valign="top"><a href="<?php echo $item->link; ?>" title="<?php echo $item->pname; ?> - <?php echo $item->intro; ?>" class="holder_detail">Детальніше...</a><br /> </td></tr></table></li> <?php endforeach; ?> </ul> Ранее этот код работал в firefox и chrome, но не работал в opera. Тогда начал проверять на валидность, переписал немного css, и поменял некоторые id на class. После чего этот код не работает. Простая анимация типа fadeOut (); работает. Пробовал еще jQuery ('ul # holder_random'). Animate ({margin-left: '-640'}, 1000); которая выполняется при нажатии. Но это действие выполняется только один раз. Нужна ваша помощь! |
.ня
|
hello, nemo :dance:
|
Часовой пояс GMT +3, время: 00:52. |