jQuery
- jQuery is a JavaScript Library.
- jQuery greatly simplifies JavaScript programming.
Events
- Moving a mouse over an element
- Selecting a radio button
- Clicking on an element
jQuery Effects
- Hide
- Show
- Toggle
- Slide
- Fade
- Animate
$(document).ready(function(){
$("#hide").click(function(){
$("p").hide();
});
$("#show").click(function(){
$("p").show();
});
});
<button id="hide">Hide</button>
<button id="show">Show</button>
<button id="hide">Hide</button>
<button id="show">Show</button>
Hey Welcome to Uki!
Fading
- fadeIn()
- fadeOut()
- fadeToggle()
- fadeTo()
Sliding
- slideDown()
- slideUp()
- slideToggle()
$(document).ready(function(){
$("#flip").click(function(){
$("#panel").slideToggle("slow");
});
});
Click Here
Hey Uki!
Chaining
<script>
$(document).ready(function(){
$("button").click(function(){
$("#p1").css("color", "red")
.slideUp(2000)
.slideDown(2000);
});
});
</script>
<p id="p1">Hey Uki!</p>
<button>Click me</button>
Hey Uki!
Referance :w3 school
No comments:
Post a Comment