This file contains hidden or 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 | |
| /** | |
| * | |
| * ---------------------------------------------- | |
| * HTML to JSON | |
| * ---------------------------------------------- | |
| * | |
| * [Currently used in Wordpress to output HTML into a Google Maps InfoWindow correctly] | |
| * |
This file contains hidden or 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
| /** | |
| * ---------------------------------------------- | |
| * isValidPostcode() Function | |
| * ---------------------------------------------- | |
| * | |
| * Tests to see if string is in correct UK style postcode: AL1 1AB, BM1 5YZ etc. | |
| * | |
| * @param p | |
| * @return {Boolean} | |
| */ |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width"> | |
| <style type="text/css"> | |
| .container { | |
| overflow: hidden; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width"> | |
| </head> | |
| <body> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width"> | |
| </head> | |
| <body> |
This file contains hidden or 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 | |
| namespace Custom; | |
| /** | |
| * | |
| * Simple way to add a photo-gallery with pagination to a PHP website. | |
| * [ready to be spruced up with JS] | |
| * | |
| * Usage: |
This file contains hidden or 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 | |
| class CustomHelpers | |
| { | |
| /** | |
| * | |
| * ---------------------------------------------- | |
| * Create a Title from a route | |
| * ---------------------------------------------- |
This file contains hidden or 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 getDirectChildren(elm, sel){ | |
| ret = []; | |
| for (var i =0; i < elm.childNodes.length; ++i){ | |
| if (elm.childNodes[i].matchesSelector(sel)){ | |
| ret.push(elm.childNodes[i]); | |
| } | |
| } | |
| return ret; | |
| } |
This file contains hidden or 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 w = window, d = document, e = d.documentElement, g = d.getElementsByTagName('body')[0], x = w.innerWidth || e.clientWidth || g.clientWidth, y = w.innerHeight || e.clientHeight || g.clientHeight; |
This file contains hidden or 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 Toggle = (function() { | |
| function Toggle( config ) { | |
| this.config = config; | |
| this.triggers = $( config.triggers ); | |
| this.closeElem = $( config.close ); | |
| this.closeAnyElem = $( config.closeAny ); | |
| this.activeClass = config.activeClass; | |
| this.shouldFollow = true; | |
| this.attachEvents(); |