- jQuery 教程
- jQuery - 主页
- jQuery - 概述
- jQuery - 基础知识
- jQuery - 语法
- jQuery - 选择器
- jQuery - 事件
- jQuery - 属性
- jQuery-AJAX
- jQuery DOM 操作
- jQuery-DOM
- jQuery - 添加元素
- jQuery - 删除元素
- jQuery - 替换元素
- jQuery CSS 操作
- jQuery - CSS 类
- jQuery - 尺寸
- jQuery - CSS 属性
- jQuery 效果
- jQuery - 效果
- jQuery - 动画
- jQuery - 链接
- jQuery - 回调函数
- jQuery 遍历
- jQuery - 遍历
- jQuery - 遍历祖先
- jQuery - 遍历后代
- jQuery用户界面
- jQuery - 交互
- jQuery - 小部件
- jQuery - 主题
- jQuery 参考
- jQuery - 实用程序
- jQuery 插件
- jQuery - 插件
- jQuery - PagePiling.js
- jQuery-Flickerplate.js
- jQuery - Multiscroll.js
- jQuery - Slidebar.js
- jQuery - Rowgrid.js
- jQuery - Alertify.js
- jQuery - Progressbar.js
- jQuery - Slideshow.js
- jQuery - Drawsvg.js
- jQuery - Tagsort.js
- jQuery - LogosDistort.js
- jQuery - Filer.js
- jQuery - Whatsnearby.js
- jQuery - Checkout.js
- jQuery - Blockrain.js
- jQuery - Producttour.js
- jQuery - Megadropdown.js
- jQuery - Weather.js
- jQuery 有用资源
- jQuery - 问题与解答
- jQuery - 快速指南
- jQuery - 有用的资源
- jQuery - 讨论
jQuery - Whatsnearby.js
Whatsnearby.js 是一个 jQuery 插件,用于快速查找最近的地点。
一个简单的 Whatsnearby.js 示例,如下所示 -
<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8"/>
<link rel = "stylesheet"
href = "https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<script src = "example/js/es5-shim.min.js"
type = "text/javascript">
</script>
<script src = "example/js/es5-sham.min.js" type = "text/javascript"></script>
<script
src = "https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"
type = "text/javascript">
</script>
<script
src = "https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places">
</script>
<script src = "source/WhatsNearby.js"
type = "text/javascript">
</script>
<script type = "text/javascript">
$(document).ready(function(){
$("#wn2").whatsnearby({
zoom:15,
width:"100%",
address: "jublihills",
placesRadius: 500,
placesTypes: [ 'restaurant', 'cafe', 'gym' ]
});
});
</script>
</head>
<body>
<div class = "container">
<div class = "well">
<div id = "wn2">
<div class = "infowindow-markup">
<strong>{{name}}</strong><br/>
{{vicinity}}
</div>
</div>
</div>
</div>
</body>
</html>
这应该产生以下结果 -
点击这里