# ex02jQstyle
<head>
<script src="./jquery-3.7.1.min.js"></script>
</head>
<body>
<h1>jQuery style</h1>
<button>change!🛎</button>
<script>
$('button').click(()=>{
console.log('click');
$('h1').css('color','pink')
$('h1').css('background-color','gray');
$('h1').css('font-style','italic');
$('h1').css('color','pink').css('background-color','gray').css('font-style','italic')
$('h1').css({
'color' : 'pink',
'background-color','gray',
'font-style','italic'
});
})
</script>
</body>
# ex03event.html
<head>
<script src="./jquery-3.7.1min.js"></script>
<head>
<body>
<h1>jQuery event</h1>
<h1>jQuery event</h1>
<h1>jQuery event</h1>
<button>change💥</button>
<script>
$('h1').on('click',()=>{
$('h1').css('color'.'orange');
})
$('h1').on('mouseover',()=>{
$('h1').css('color'.'red');
})
$('h1').on('mouseout',()=>{
$('h1').css('color'.'black');
})
</script>
</body>
<head>
<title>dynamic event</title>
</head>
<style>
button{
width : 100px;
height : 60px;
border : none;
font-weight : 600;
font-size : 1.5rem;
margin : 5px
}
.click{
background-color:lightblue;
}
.on{
background-color : lightsalmon;
}
</style>
<script src="./jquery-3.7.1.min.js"></script>
</head>
<body>
<button class="click">click</button>
<button class="on">on</button>
<br>
<script>
$('.click').click(()=>{
console.log('click');
$('body').append('<button class="click">click</button>')
})
$(document).on('click','.on',()=>{
console.log('on');
$('body').append('<button class="on">on</button>');
</script>
#ex04on.html