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
/** | |
* Recursively searches the startObject for the given value. | |
* | |
* All matches are displayed in the browser console and stored in the global variable "gsResults" | |
* The function tries to simplify DOM element names by using their ID, when possible. | |
* | |
* Usage samples: | |
* | |
* globalSearch( document, 'someValue' ); // Search entire DOM document for the string value. | |
* globalSearch( document, '^start' ); // Simple regex search (function recognizes prefix/suffix patterns: "^..." or "...$"). |
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> | |
<head> | |
<meta name="viewport" content="width=device-width; height=device-height; initial-scale=1.0; maximum-scale=1.0;"/> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> | |
<script type="text/javascript"> | |
window.onload=function(){ |
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
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function fetchAndPrintPosts(id,num,tag) | |
{ | |
// Read data from Tumblr, this creates the variable tumblr_api_read. | |
jQuery.ajax({ | |
url : "http://staff.tumblr.com/api/read/json?num=" + num + "&filter=text&tagged=" + tag, | |
dataType : "jsonp", | |
success : function(test) { |
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
centerMapOnCity: function() { | |
var that = this; | |
this.deleteOverlays(); | |
var entered_city = $("post_location_name").value; | |
if(entered_city) { | |
var city = "", state = "", country = ""; | |
this.geocoder.geocode( { 'address': entered_city}, function(results, status) { | |
if (status == google.maps.GeocoderStatus.OK) { | |
var latlng = results[0].geometry.location; | |
general_location = that.getGeneralLocation('address', results); |