Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="jquery-1.2.3.js" type="text/javascript"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- // grab images
- var up=$(this).find("img.up");
- var down=$(this).find("img.down");
- // put click-event on down and find and animate imgage.newsblock
- $(down).click(function() {
- $(this).parents("#newsbox").find("img.newsblock").animate({marginTop:220}, "slow");
- };
- // put click-event on down and find and animate imgage.newsblock
- $(up).click(function() {
- $(this).parents("#newsbox").find("img.newsblock").animate({marginTop:-220}, "slow");
- };
- });
- </script>
- </head>
- <body style="background: url(gegenueberstellung_04.png) 0 0 no-repeat;height:800px;">
- <div id="newsbox">
- <img class="up" src="spacer.gif" height="17" width="17" />
- <img class="down" src="spacer.gif" height="17" width="17" />
- <div id="showbox">
- <img class="newsblock" src="content.gif" />
- </div>
- </div>
- </body>
Add Comment
Please, Sign In to add comment