Sunday, March 4, 2012

Implement bounce effect using jQuery UI




<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Mobile-Web-App: jQuery UI - Bounce Effect</title>
<link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/ui/1.8.18/jquery-ui.js"></script>

<script type="text/javascript">

$(function() {
$("#bouncebutton").click(function() {
var options = {}; //no options
$("#bounceobject").effect("bounce", options, "normal", callback);
});

function callback() {
//It will be called after the effect is completed
};
});

</script>
</head>
<body>
<div id="bounceobject">
<h1>Mobile-Web-App: jQuery UI - Bounce Effect</h1>
<img src="http://goo.gl/BlQEX"></img>
</div>

<button id="bouncebutton">Bounce Effect</button>
</body>
</html>


No comments:

Post a Comment