| Код | <div style="width:600px; height:100px;">
<div style="width:100px; height:100%; background-color: #CC0; float:left" class="myclass"></div> <div style="width:100px; height:100%; background-color: #0C9; float:left " class="myclass"></div> <div style="width:100px; height:100%; background-color: #999; float:left " class="myclass"></div> <div style="width:100px; height:100%; background-color: #F60; float:left " class="myclass"></div>
<div style="clear:both;"></div>
</div>
|
| Код |
$(document).ready(function() { $(".myclass").first().delay(500).hide(500, function shownext() { $(".myclass").prev().delay(1000).show(); $(this).next(".myclass").delay(500).hide(500,shownext);
} ); });
|
скажите как зациклить?????? думал зациклить условием, но что то не получается или в чем проблема?! if($(this).is(":last-child")) {alert('последний'); } |