brianjlandau (owner)

Revisions

gist: 174039 Download_button fork
public
Public Clone URL: git://gist.github.com/174039.git
Embed All Files: show embed
ajax_update.html #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<div id="map"></div>
 
<div id="map-side-bar">
  <div class="map-location" data="{id: 1, point: {lng: -122.2678847, lat: 37.8574888}, category: 'market'}">
    <a href="#" class="map-link">Berkeley Bowl</a>
    <div class="info-box">
      <p>A great place to get all your groceries, especially fresh fruits and vegetables.</p>
    </div>
  </div>
  <div class="map-location" data="{id: 2, point: {lng: -122.4391131, lat: 37.7729943}, category: 'restaurant'}">
    <a href="#" class="map-link">Nopalito</a>
    <div class="info-box">
      <p>The best authentic Mexican restaurant in San Francisco.</p>
    </div>
  </div>
  <div class="map-location" data="{id: 3, point: {lng: -122.4481651, lat: 37.8042096}, category: 'museum'}">
    <a href="#" class="map-link">Exploratorium</a>
    <div class="info-box">
      <p>A hands-on museum of science, art, and human perception in San Francisco.</p>
    </div>
  </div>
</div>
 
<div class="footer">
  <p id="pagination"><a href="_ajax.html">Click For More Locations</a></p>
</div>
ajax_update.js #
1
2
3
4
5
6
7
8
9
$(document).ready(function(){
  $('p#pagination a').attach(Remote.Link, {
    success: function(html){
      $('#map-side-bar').html(html);
      $('#map').jMapping('update');
    }
  });
  $('#map').jMapping();
});