How to make animated up & down in php

To animate up & down in php write below code in script section:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("#down").click(function(){
        $("#img").animate({"top":"100px","left":"100px","height":"150px","width":"150px", "border-width":"3px solid #FF0000"},1000);
    });
$("#up").click(function(){
        $("#img").animate({top:"0","left":"0","border-width":"1px solid #FF0000"},1000);
    });
});
</script>

To animate up & down in php write below code in body section:

<div>
<input type="submit" name="down" id="down" value="Down" />
<input type="submit" name="up" id="up" value="Up" /><br />
<img src="Interval/3.jpg" id="img" />

</div>

For animation you need to write given style in css:

<style type="text/css">
#img{
height:100px; width:100px; position:relative;
border:1px solid #FF0000;
}
</style>

Thanks for visit
Give your feedback in comment

Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment