12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- $(document).ready(function() {
- $('#menu li div').hover(function(){
- $(this).stop().animate({
- opacity: 1
- },100);
- },function(){
- $(this).stop().animate({
- opacity: 0.5
- }, 100);
- });
- //------------------------------------------鼠标点击图片
- var i=1;
- $('#menu').children('li').click(function(){
- if(i==1){
- wz=$(this).css('left');
- tz=$(this).css('top');
- dq=$(this).index();
- $(this).siblings(dq).fadeOut();
- $(this).stop().animate({left:'-10px',top:'50px'},300) ;
- $(this).children('li div').attr('id','red');
- $(this).children('img').animate({opacity:'1'});
- $(this).children('.aaays').css('display','none');
- //$('#dang').css('z-index','999');
-
- //------------------------------------------鼠标划出全部的时候
- $('#name').children('div').eq(dq).stop().animate({top:'-10px'},300);
- i++;
- }
- $('.close').click(function(){
- $('#menu li div').removeAttr("id");
- $('#nav').find('li').fadeIn();
- $('#nav').find('li').eq(dq).stop().animate({left:wz,top:tz},300);
- $('#name').children('div').eq(dq).stop().animate({top:'-1300px'});
- i=1;
- //$('#dang').css('z-index','0');
- });
-
-
-
- });
- /*$('#nav').hover(function(){ },function(){
- $('#nav').find('li').fadeIn();
- $('#nav').find('li').eq(dq).animate({left:wz},1000);
- $('#name').children('div').eq(dq).animate({top:'-500px'});
- $('#dang').css('z-index','0');
- })*/
- //------------------------------------------鼠标滑过透明
- /*$('#aaa').children('li').hover(function(){
- $(this).children('img').animate({opacity:'0.5'},500);
- $(this).children('.aaays').css('display','block');
- },function(){
- $(this).children('img').animate({opacity:'1'});
- $(this).children('.aaays').css('display','none');
- });*/
-
- });
|