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 selector = 'img' // Replace this with the selector for the element you want to make transformable | |
jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() { | |
jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() { | |
(function() { | |
var $, applyTransform, getTransform, makeTransformable; | |
$ = jQuery; |
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
// el.style.filter = ''; isn't working, this is the solution | |
el.style.removeAttribute( "filter" ); | |
// when plain js is used, the above isn't working so you can try | |
el.style.setAttribute( "filter",'' ); |
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
// source http://pastebin.com/n3WQdLDh | |
function extra_notify_postauthor( $comment_id, $comment_type = '' ) { | |
$comment = get_comment( $comment_id ); | |
$post = get_post( $comment->comment_post_ID ); | |
$author = get_userdata( $post->post_author ); | |
// The comment was left by the author | |
if ( $comment->user_id == $post->post_author ) | |
return false; | |
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 if ( ! defined( 'FW' ) ) { die( 'Forbidden' ); } | |
class FW_Extension_Yourextension extends FW_Extension { | |
private $post_type = 'yourposttype'; | |
private $slug = 'yourslug'; | |
/** | |
* @internal | |
*/ |
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 to process a **string value of a SVG transform attribute** to have same aspect as a CSS3 transform | |
// with the transform origin of 50% 50% | |
// http://stackoverflow.com/questions/39191054/how-to-compensate-translate-when-skewx-and-skewy-are-used-on-svg/39210937 | |
function combineTranslates(transform) { | |
var ts = [], // will contain list of elementary transformations | |
r = /\s*([A-Za-z0-9]+\s*\([\-0-9.,\s]*\))/g, | |
match, | |
pos = 0, // used during tokenization | |
deg = Math.PI/180.0, | |
x = 0, y = 0, // translation gets accumulated here |
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
/* | |
* Ticker by Grant Skinner. Dec 5, 2010 | |
* Visit http://easeljs.com/ for documentation, updates and examples. | |
* | |
* | |
* Copyright (c) 2010 Grant Skinner | |
* | |
* Permission is hereby granted, free of charge, to any person | |
* obtaining a copy of this software and associated documentation | |
* files (the "Software"), to deal in the Software without |
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 t = 'translate', s = 'scale', r = 'rotate', k = 'skew', x = 'translateX', y = 'translateY', z = 'translateZ', t3d = 'translate3d', | |
sx = 'skewX', sy = 'skewY', rx = 'rotateX', ry = 'rotateY', rz = 'rotateZ', p3d = 'perspective', | |
sp = '(', ep = ') ', cm = ','; | |
var interpolateCSSTransform = function(l,p,a,b,v) { | |
var tr = ''; | |
if ('perspective' in b){ tr += b['perspective']; } // 3d perspective always goes first | |
if (t in b ) { | |
if ('x' in b[t]) { // translate 2D | |
tr += t + sp + unit( a[t]['x'].value,b[t]['x'].value,b[t]['x'].unit,v) | |
+ cm + unit( a[t]['y'].value,b[t]['y'].value,b[t]['y'].unit,v) + ep; |
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
/* | |
|-------------------------------------------------------------------------- | |
| GMT Timezones | |
|-------------------------------------------------------------------------- | |
| | |
| List GMT Timezones | |
*/ | |
************ PHP ************ | |
$timezones = 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
var touchstartX = 0; | |
var touchstartY = 0; | |
var touchendX = 0; | |
var touchendY = 0; | |
var gesuredZone = document.getElementById('gesuredZone'); | |
gesuredZone.addEventListener('touchstart', function(event) { | |
touchstartX = event.screenX; | |
touchstartY = event.screenY; |
OlderNewer