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
/** | |
* jQuery Accordion | |
*/ | |
jQuery( document ).ready( function( $ ) { | |
$( document ).on( 'click', '.accordion .accordion-trigger', function() { | |
$( this ).closest( '.accordion' ).find( '.accordion-reveal' ).slideToggle(); | |
} ); | |
} ); |
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 | |
/** | |
* Get worded difference between two dates | |
* | |
* @param string $date | |
* @return string | |
*/ | |
function date_difference( $date ) { | |
$start_date = new DateTime( $date ); |
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 offsetX( parentX, xOffset, yOffset, angle ) | |
{ | |
var a = ( -angle ) * ( Math.PI / 180 ), | |
val = ( ( xOffset * Math.cos( a ) ) - ( yOffset * Math.sin( a ) ) ) + parentX; | |
return Math.round( val ); | |
} | |
function offsetY( parentY, xOffset, yOffset, angle ) | |
{ | |
var a = ( -angle ) * ( Math.PI / 180 ), |
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
// rotate_destination( source_angle , destination_angle , rotation_speed , ease_amount(0 to 1) ); | |
return median( -argument2 , argument2 , ( 1 - argument3 ) * ( ( ( ( ( argument0 - argument1 ) mod 360 ) + 540 ) mod 360 ) - 180 ) ); |
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 | |
/** | |
* URL extraction class | |
* | |
* @author Nik Sudan | |
*/ | |
class UrlExtractor { | |
public static $parts = 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
<h1>£<span class="numberRoll">100</span></h1> |
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 class="fadeWhenScrolledTo"> | |
<h1>Guess what?</h1> | |
<p>This should fade in when you scroll to it!</p> | |
</div> | |
<div class="fadeWhenScrolledTo"> | |
<h1>How is that possible?</h1> | |
<p>With this adequate jQuery script, that's how!</p> | |
</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
<div class="fadeCycle"> | |
<img src="img1.jpg"> | |
<img src="img2.jpg"> | |
<img src="img2.jpg"> | |
</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
/** | |
* Gets information about where the current camera is facing | |
* | |
* @return RaycastHit/Boolean | |
*/ | |
function getTarget() | |
{ | |
var target : RaycastHit; | |
if ( Physics.Raycast( transform.position, transform.TransformDirection( Vector3.forward ), target ) ) { |
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 | |
/** | |
* Restyle login page | |
* | |
* @return void | |
*/ | |
function restyle_login_page() | |
{ ?> | |
<style type="text/css"> |