How to animate image left in PHP

To animate image right to left you need to use jquey "animate" class in script.The code for animate image given below

Script section code:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("#button").click(function(){
        $("#img").animate({left: '500px'});
    });
});

</script>

CSS section code:

<style type="text/css">
#img{
position:absolute;
}

</style>

Body section code:

<input type="button" name="button" id="button" value="Start Animation" />

<div id="img"><img src="Your image path" height="200" width="200" /></div>
Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment