제이쿼리 js폴더에 넣기
<script src =" js/jquery-0.0.0.js"></script>
<script src =" js/main.js"></script>

$(function(){
//전체 자바스크립스
});



--------------선택자
$(function(){
	//$('header')
    //$('#css')
   // $('.show')
   
   $('header').css('border', 'solid 10px red');
   $('#masthead-id').css("color", "red");
   $('.masthead-heading").css("color","blud");
   
   var masthead = $('#masthead-id');
   
   $('header #masthead-id.masthead-subheading').css("color","red");
   
   ---------------------이벤트
   $('header #masthead-id').**mouseenter**(function(){
   	$('header #masthead-id').css('backgorund-color','yellow');
   })
 $('header #masthead-id').**mouseleace**(function(){
   	$('header #masthead-id').css('backgorund-color','yellow');
   })
   
 $('header #masthead-id').**click**(function(){
   	$('header #masthead-id').css('backgorund-color','pink');
   })

$('**header #masthead-id**').click(function(){
   	$(**this**).css('backgorund-color','pink');
   })
   
$('header #masthead-id').**on**(function(){
	mouseenter : function() {
    	$(this).css("background-color","yellow");
        },
    mouseleace : function() {
    	$(this).css("background-color","blue");
        },
    click : function() {
    	$(this).css("background-color","pink");
        },    
   })
   
   
$('header #masthead-id').**on**(function(){
	
    mouseenter : function() {
    	$(this).**fadeTo**"fast",1); //투명도
        },
    mouseleace : function() {
    	$(this).fadeTo"fast",0.5);
        },    
   })

$("#masthead-id").click(function(){
	$(".masthead-heading").**hide**();
    });

$("#masthead-id").click(function(){
	$(".masthead-heading").**show**();
    });

$("#masthead-id").click(function(){
	$(".masthead-heading").**toggle**();
    });

$("#masthead-id").click(function(){
	$(".masthead-heading").**slideDown**();
    });

$("#masthead-id").click(function(){
	$(".masthead-heading").**slidetoggle**();
    });

	

});

$("#masthead-id").click(function(){
	$(".masthead-heading").**fadeOut**();
    });
$("#masthead-id").click(function(){
	$(".masthead-heading").**fadeIn**();
    });
    
$("#masthead-id").click(function(){
	$(".masthead-heading").**addClass**('blue');
      }); 
$("#masthead-id").click(function(){
	$(".masthead-heading").**removeClass**('important');
    });    
    
    
    
    
    
    
    
    
    
    
    
    });    

profile
HTML/CSS/JAVASCRIPT

0개의 댓글