I am working on moving the text UP/DOWN on cliking on arrow image placed on right handside.
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Scroll</title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<style type="text/css">
.top{
position: absolute;
top:0;
right:0;
background-image: url('uparrow.png');
background-size: 16px 16px;
width: 16px;
height: 16px;
}
.btm{
position: absolute;
display:block;
background-image: url('downarrow.png');
background-size: 16px 16px;
width: 16px;
height: 16px;
bottom: 0;
right: 0;
}
</style>
<script type="text/javascript">
function scrollup(objId){
alert("Scroll UP");
console.log(objId);
var a = document.getElementById(objId).style.top;
console.log(a);
}
function scrolldown(objId){
alert("Scroll DOWN");
var b= document.getElementById(objId).style.btm;
console.log(objId);
console.log(b);
}
</script>
</head>
<body>
<div id="scrollDiv" style="btm:0px">
This is what i like to say.
</div>
<div class="top" onclick="scrollup('scrollDiv')"></div>
<div class="btm" onclick="scrolldown('scrollDiv')"></div>
</body>
</html>
Oncliking on images nothing happens..
Can somebody help me in this...
Your help highly appreciated.....
Regards,
Murali