jQuery

How to used jQuery animation in html

jQuery is part of JavaScript frame work are the three fundamental languages of the web. jQuery is most useful animation and event driven library. We structure our websites with HTML, style them with CSS, and add interactive functionality with JavaScript. jQuery Animation is most powerful and very fast work to event fire and the jQuery Library provide multiple event and animation method used to web page.

HTML

<div id="usedme">
  Click here
</div>
<div id="block"></div>

CSS

#block{
height:250px;
width:250px;
background:red;
}

jQuery

$( "#usedme" ).click(function() {
  $( "#block" ).animate({
    opacity: 0.25,
    left: "+=50",
    height: "toggle"
  }, 5000, function() {
    // Animation complete.
  });
});

Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, and XML.

About the author

Codeflexible

Leave a Comment