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
if('test' in localStorage)alert('s'); | |
else localStorage.test = 's'; | |
alert(localStorage.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
<?php | |
//The function print_r allows you to print the content of an array | |
//www.domain.com?param1=value1¶m2=value2 | |
print_r($_GET['awesome']); | |
/***HERE IS THE ACTUAL USE OF THIS*****/ |
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
$nested = array( | |
"test" => array () | |
); |
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
<div id="hiddenContent" style="display:none;"></div><!--content will be temporarily added here--> | |
<script> | |
var myContent = document.getElementById('myDdiv'), | |
hiddenDiv = document.getElementById('hiddenContent'); | |
$(document).on('click','a[data-openpostid]',function(e){ | |
var postId = this.getAttribute('data-openpostid'); | |
var passThisObj = {//Object containin my parameters |
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
<html> | |
<head>.... | |
<body> | |
<a href="#nonsense" data-openPostID="11">11</a> | |
<a href="#nonsense" data-openPostID="5">5</a> | |
<div id="myDiv" style="background:red;"> | |
<!--PUT ALL WORDPRESS CALLS HERE..THE 4 or so lines for wordpress --> | |
</div> |
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
function myClass(params){ | |
if(typeof params === 'undefined')params = {}; | |
if( !('someOtherParam' in params)params.someOtherParam = 'blah';//Neat way to set default params in stuff :) | |
this.params = params; //bind params to this instance | |
this.set = function(){ | |
//Do your thing | |
if(typeof this.params.callback === "function")this.params.callback(); |
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
var CLASSNAME = function(){ | |
var first = "firstvar", | |
second = "secondvar"; | |
//Expose private vars | |
return { | |
first :first | |
}; | |
})(); |
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 xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> |
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
document.addEventListener("DOMContentLoaded", function(){ | |
window.Mustache = null;//Because its what can be expected of Guillete | |
}); |
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
(function(){ | |
function patch(){//ACTUAL PATCH | |
$('.VideoItem[data-jnj-inlinevideo="brightcove"]').each(function(){//FLAG RELEVANT PLAYeRS | |
var $this = $(this), | |
$imgArea = $this.find('.video_trigger'), | |
ratio = Math.floor( ( $imgArea.width() / $imgArea.height() ) * 100);//CHECK IF RATIO IS MESSED UP THEREFORE A baD IMAGE | |
if(ratio != 177){ | |
$this.attr('data-using-default-image',ratio); | |
} | |
}); |
OlderNewer