Top 50 brunch locations in the Seattle area. Locations from Urban Spoon
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<style> | |
</style> | |
</head> | |
<body> | |
<button id="html-button" type="submit" value="HTML Tag Toggle">Add HTML Tags</button> |
This file contains hidden or 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
# | |
# Sam, for some weird reason the promise.done() | |
# function wasn't able to work for me now, | |
# I'll figure it out later...for now were are using | |
# .then for concurrent requests...let's chat about this | |
# | |
# | |
# this is a standalone example | |
# so just copy to a file and load into your browser |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<style> | |
.states { | |
fill: #6BA0B5; | |
stroke: #fff; | |
stroke-width:1px; | |
} | |
.states:hover { |
This file contains hidden or 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
// tabletop.js is linked above | |
function init() { | |
var json = []; //prented this is a geojson and not just an array | |
Tabletop.init({ | |
key: '0AkE-VGwUGzsSdHRjTmtNMXhONjYxQUxnOV9SajY4VkE', | |
callback: function(data, tabletop) { | |
var entries = []; |
This file contains hidden or 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
function init() { | |
var url = 'http://api.example.com/stuffs...' | |
$.ajax({ | |
type: "GET", | |
dataType: "jsonp", | |
cache: false, | |
url: url, | |
success: function(data) { | |
console.log(data); | |
}, |
This file contains hidden or 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
$(document).ready(function(){ | |
$('form').submit(function(event){ | |
var json = JSON.stringify($('form').serializeObject()); | |
$('#result').text(json); | |
return false; | |
}); | |
$.fn.serializeObject = function() { | |
var geojson = {}; | |
geojson['type'] = 'FeatureCollection'; |
Good for acting on specific pieces of your SVG object instead of just link as an <img>
you can bring the entire object into your HTML. You need two things:
- SVG file with a double extension ending with
.php
- e.g.logo.svg.php
- WP include statement with the built-in function
get_template_part
<?php
get_template_part( 'includes/partials/logo', 'logo.svg' );
?>