Google Maps JavaScript API v3 and D3js cloned and extended from mbostock.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<div id="map" style="position: absolute; width: 100%; height: 100%"></div> | |
<script type="text/javascript"> | |
function init(){ | |
var map = new google.maps.Map(document.getElementById('map'), { | |
center: new google.maps.LatLng(37, -95), | |
zoom: 5 | |
}); |
If you need a plain JavaScript function to add a smooth scrolling back to the top of the page, you can use this script.
- Add an id of "top" to the
body
- Add the
onclick
function to the link - Include the JavaScript function in your HTML file, preferrably at the bottom before the closing
</body>
tag if possible. Since this script is not part of the UI it can load last and will not negatively affect the user experience or usability of the page.
Author: Marco Del Corno - http://thewebthought.blogspot.com/2012/06/javascript-smooth-scroll-to-top-of-page.html
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |