Skip to content

Instantly share code, notes, and snippets.

@jnruel
jnruel / pretty-php-date-ranges.php
Created March 7, 2017 22:58 — forked from jb510/pretty-php-date-ranges.php
Pretty PHP Date Ranges
<?php
/**
* Verbose Beautified Date Range
*
* @access public
* @param mixed $start_date
* @param mixed $end_date
* @return $date_range (beautified date range)
* @license WTFPL
*
@jnruel
jnruel / drag-n-drop.js
Created March 28, 2016 20:07
Revert dragged element if not accepted by a droppable element, using jquery UI draggable and droppable
$("#draggable p").draggable({
// animate the dragged item back to its original position
// if not accepted by a droppable element.
revert: 'invalid',
revertDuration: 200,
});
$("#droppable div").droppable({
// tolerance: 'touch',
// This will accept a drop from an element with a class that