Skip to content Skip to sidebar Skip to footer

How To Show "back To Top" Button Using Jquery Only If Browser Height Is Shorter Than Page?

How to add/show 'back to top' button at bottom in a div using jquery only if height browser height is shorter than page, other wise it should be hidden?

); if (wrapper.outerHeight(true) > $(window).height()) { wrapper.append('<p><a href="#' + wrapper.attr('id') + '">Back to top</a></p>'); }


Solution 2:


Post a Comment for "How To Show "back To Top" Button Using Jquery Only If Browser Height Is Shorter Than Page?"