/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> $(document).ready(function(){ var height = $("#main").height(); if (height > 700) { $(".top").show(); } else { $(".top").hide(); } }); </script> <div id="main" style="border:1px dashed #ccc;"> <p>If content in this div gets higher than 700px, link will show</p> </div> <div class="top"><a href="#">Back to top</a></div>
URL: http://www.vagrantradio.com/demos/top_link/index.html
Comments
