Skip to content

Instantly share code, notes, and snippets.

<!-- Development version: -->
<script>document.write('<script src="/myJavascript.js?dev=' + Math.floor(Math.random() * 100) + '"\><\/script>');</script>
//remove all dynamic styling
$("#element").removeAttr("style");
//remove only one css property
var cssObject = $('selector').prop('style'); cssObject.removeProperty('background-color');
$( document ).ready(function() {
$( ".class" ).append(function() {
var tijd_datum = new Date();
var dag = tijd_datum.getDay();
var dag2 = tijd_datum.getDate();
var maand = tijd_datum.getMonth();
var jaar = tijd_datum.getFullYear();
var maandarray = new Array('januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december');
var dagarray = new Array('zondag','maandag','dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag');
$('iframe').attr('src', function(index, val) {
return val;
});
// iframes
var $iframes = $( document.querySelectorAll( '.videos iframe' ) );
function iframeSizing() {
var $this = $( this ),
width = $this.width(),
height = $this.height(),
containerWidth = $this.parent().width(),
heightRatio = height / width,
newHeight = heightRatio * containerWidth;