随便写的 对象交替的方法

<ul class="ss">
 <li> <input name="s1" type="radio" value="1" /><a href="javascript:">11</a></li>
  <li><input name="s1" type="radio" value="1" /><a href="javascript:">22</a></li>
   <li><input name="s1" type="radio" value="1" /><a href="javascript:">333</a></li>
 
 </ul>


<script language="javascript">
$(".ss a").click(function()
{
  aa($(this));
 
}
)


function aa(hehe)
{
     var temp =hehe.parent().clone();
   var temp2 =hehe.parent().prev();

  temp.insertBefore(temp2)
 
   hehe.parent().remove();
 
  $(".ss a").click(function()
{
    aa($(this));
})
}

</script>

posted on 2012-08-02 21:09  西湖浪子  阅读(106)  评论(0)    收藏  举报