Skip to content

Instantly share code, notes, and snippets.

View brothatru's full-sized avatar

michael trieu brothatru

View GitHub Profile
var test1 = $('<div class="test1"></div>'),
test2 = $('<div class="test2"></div>'),
test3 = $('<div class="test3"></div>');
// adds test1 div, test2 div, then test3 div etc..
$('body').append(test1, test2, test3);
// when you want to append a div within a div
$(test1).append(test2);
<script src='http://cdn.onescreen.net/os/static/apps/s/_onescreen.js'></script>
<div id='os_dmp_embed'></div>
<script>com.onescreen.widgets.load('10806-c1975f5be2c58846962b15581d692c2b', 'os_dmp_embed', {
'media' : 'www.google.com'
});
</script>
<noscript>This application requires JavaScript.</noscript>
<meta property="og:site_name" content="OS WP Test Site">
<meta property="og:url" content="http://wptest.onescreen.net/uncategorized/auto_play/">
<meta property="og:title" content="<?php echo $post->post_title; ?>">
<meta property="og:type" content="video">
<meta property="og:image" content="http://images.1sfx.net/1203017/1203017_DA_OTc0NTk1NzA.png">
<meta property="og:description" content="<?php echo $post->post_excerpt; ?>">
<meta property="og:video:type" content="application/x-shockwave-flash">
<meta property="og:video:width" content="480">
<meta property="og:site_name" content="OS WP Test Site">
<meta property="og:url" content="http://wptest.onescreen.net/uncategorized/auto_play/">
<meta property="og:title" content="<?php echo $post->post_title; ?>">
<meta property="og:type" content="video">
<meta property="og:image" content="http://images.1sfx.net/1203017/1203017_DA_OTc0NTk1NzA.png">
<meta property="og:description" content="<?php echo $post->post_excerpt; ?>">
<meta property="og:video:type" content="application/x-shockwave-flash">
<meta property="og:video:width" content="480">
[0] => WP_Post Object
(
[ID] => 76
[post_author] => 7
[post_date] => 2013-04-17 23:08:25
[post_date_gmt] => 2013-04-17 23:08:25
[post_content] =>
[post_title] => iTaste MVP
[post_excerpt] =>
[post_status] => publish
<a class="_1xw shareLink _1y0" href="http://wptest.onescreen.net/uncategorized/auto_play/" target="_blank" rel="nofollow" onmouseover="LinkshimAsyncLink.swap(this, &quot;http:\/\/wptest.onescreen.net\/uncategorized\/auto_play\/&quot;);" onclick="LinkshimAsyncLink.referrer_log(this, &quot;http:\/\/wptest.onescreen.net\/uncategorized\/auto_play\/&quot;, &quot;https:\/\/www.facebook.com\/si\/ajax\/l\/render_linkshim_log\/?u=http\u00253A\u00252F\u00252Fwptest.onescreen.net\u00252Funcategorized\u00252Fauto_play\u00252F&amp;h=WAQHKoZQEAQHPVlKxwv6OH4XJvkohSzLYXlnSP9if-ffH0w&amp;enc=AZO6P1ogbSIB2AxR5G2UvcF7WIyAPnwi-xFlO5L5QDQquAuqyBBkwa1Adbt_JIldSos9Dx4h_bFZkMcetzAiAIwq&amp;s=1&quot;);"><div class="_1xy _1xx"><img class="_42xb img" src="https://static.xx.fbcdn.net/rsrc.php/v2/y4/r/-PAXP-deijE.gif" alt="" height="116" width="116" style="background-image: url(https://fbexternal-a.akamaihd.net/safe_image.php?d=AQAI4Aa6dVoT7XrW&amp;w=116&amp;h=116&amp;url=http%3A%2F%2Fimages.1sfx.net%2F1203017%2F1203017_DA_OTc0NTk1NzA.pn
<a class="_1xw shareLink _1y0" href="http://wptest.onescreen.net/uncategorized/auto_play/" target="_blank" rel="nofollow" onmouseover="LinkshimAsyncLink.swap(this, &quot;http:\/\/wptest.onescreen.net\/uncategorized\/auto_play\/&quot;);" onclick="LinkshimAsyncLink.referrer_log(this, &quot;http:\/\/wptest.onescreen.net\/uncategorized\/auto_play\/&quot;, &quot;https:\/\/www.facebook.com\/si\/ajax\/l\/render_linkshim_log\/?u=http\u00253A\u00252F\u00252Fwptest.onescreen.net\u00252Funcategorized\u00252Fauto_play\u00252F&amp;h=WAQHKoZQEAQHPVlKxwv6OH4XJvkohSzLYXlnSP9if-ffH0w&amp;enc=AZO6P1ogbSIB2AxR5G2UvcF7WIyAPnwi-xFlO5L5QDQquAuqyBBkwa1Adbt_JIldSos9Dx4h_bFZkMcetzAiAIwq&amp;s=1&quot;);"><div class="_1xy _1xx"><img class="_42xb img" src="https://static.xx.fbcdn.net/rsrc.php/v2/y4/r/-PAXP-deijE.gif" alt="" height="116" width="116" style="background-image: url(https://fbexternal-a.akamaihd.net/safe_image.php?d=AQAI4Aa6dVoT7XrW&amp;w=116&amp;h=116&amp;url=http%3A%2F%2Fimages.1sfx.net%2F1203017%2F1203017_DA_OTc0NTk1NzA.pn
[
{ "keys": ["ctrl+left"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["ctrl+right"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["ctrl+shift+left"], "command": "move_to", "args": {"to": "bol", "extend": true} },
{ "keys": ["ctrl+shift+right"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["alt+backspace"], "command": "delete_word", "args": { "forward": false } },
{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{
"keys": ["ctrl+1"],
"command": "set_layout",
<!DOCTYPE html>
<html <?php language_attributes(); ?> >
<head>
<meta name="google-site-verification" content="U0-RfGrSXi70uxz2_aCEJxHNW-UPewlh8WmrYQdK3AY" />
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
<title><?php wp_title('-', true, 'right'); ?></title>
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,600' rel='stylesheet' type='text/css'>
<?php $url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; if (stripos($url, '/legal') !== false) { } else if (function_exists('yoast_analytics')) yoast_analytics(); ?>
/* HEADER JS */
$(document).ready(function(){
// hides caret from menu when page has no subpages
// var header_menu = $('#menu-header-nav');
var header_menu = $('#header > ul');
var listitems = header_menu.children('li');
listitems.each(function(index, item){
if ($(item).children('ul').length == 0){