Skip to content

Instantly share code, notes, and snippets.

// 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;
$('iframe').attr('src', function(index, val) {
return val;
});
$( 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');
//remove all dynamic styling
$("#element").removeAttr("style");
//remove only one css property
var cssObject = $('selector').prop('style'); cssObject.removeProperty('background-color');
<!-- Development version: -->
<script>document.write('<script src="/myJavascript.js?dev=' + Math.floor(Math.random() * 100) + '"\><\/script>');</script>
$(window).bind('resize', function(e){
window.resizeEvt;
$(window).resize(function(){
clearTimeout(window.resizeEvt);
window.resizeEvt = setTimeout(function(){
} ,500);
});
});
jQuery.fn.verticalAlign = function ()
{
return this
.css("margin-top",($(this).parent().height() - $(this).height())/2 + 'px' )
};
$('element').verticalAlign();
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('staticblock_identifier')->toHtml() ?>
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<!-- ## Default Layout ## -->
<default>
<!-- Remove unwanted blocks entirely
<remove name="right.poll"/>
<remove name="right.permanent.callout"/>
@Vernonmac
Vernonmac / magento-remove-dashboard-links.phtml
Created June 22, 2014 12:23
Magento Remove Dashboard Links