Web I
Class 12
Fall 2024
DES255
jQuery
Installing jQuery
jQuery syntax
jQuery events
$("p").click(function(){
// action goes here!!
});
$("#p1").mouseenter(function(){
alert("You entered p1!");
});
jQuery “this”
$("button").click(function(){
$("this").hide( );
});
Useful jQuery Methods
Animating with jQuery
Animating with jQuery
You can animate any css property via jQuery as well
$(“selector”).animate({
left: '250px',
opacity: '0.5',
height: '150px',
width: '150px'
}, 1000);
Using “ height: '+=150px',” would increase the height by 150px instead of a set value
We only have 1 class left!