Skip to content

Instantly share code, notes, and snippets.

View davidemaser's full-sized avatar

David Maser davidemaser

View GitHub Profile
@davidemaser
davidemaser / modalJQ.js
Last active January 19, 2016 22:15
Modal Maker
/**
* Created by david-maser on 15/07/15.
*/
(function ( $ ) {
$.fn.makeModal = function( options ) {
var settings = $.extend({
// These are the defaults.
title: "Title",
color: "#fff",
@davidemaser
davidemaser / ajax-filter.js
Last active August 29, 2015 14:25
Filter Blocks is a jquery plugin that creates a matched set of buttons and blocks that can be filtered based on ID. This plugin gets it's data from an external json file and builds a row of buttons corresponding to each json data element as well as a number of blocks (defined in the json file) that are linked to each button. When a button is pre…
/**
* Created by david-maser on 29/12/14.
*/
(function( $ ){
$.fn.filterBlocks = function (options) {
var defaults = {
parent: 'body',
buttons: {
buttonSectionId: 'filter_buttons',
buttonGroupClass: 'btn-group',
@davidemaser
davidemaser / ajax-filter.html
Last active August 29, 2015 14:25
Filter Blocks is a jquery plugin that creates a matched set of buttons and blocks that can be filtered based on ID. This plugin gets it's data from an external json file and builds a row of buttons corresponding to each json data element as well as a number of blocks (defined in the json file) that are linked to each button. When a button is pre…
<script>
$(document).ready(function(){
$(this).filterBlocks({
parent:'#container',
filterMethod: 'buttons', //choice is menu or buttons
allowQsFilter: true,
/**
* If allowQsFilter is set to true, you ca add the querystring "?filter="
* or "&filter=" to allow the filter method to be changed from the url
* The accepted values are menu or buttons (?filter=menu)
{"entry":[
{
"label":"Men's",
"children":5,
"color": "#E3E3E3",
"display": [{
"id":1,
"image":"img/src/assets/",
"category":12,
"reduction":0
@davidemaser
davidemaser / paginator.js
Last active January 19, 2016 22:15
Paginator plugin
/**
* Created by david-maser on 24/12/14.
* david.maser@altitude-sports.com
*
* jQuery plugin to create dynamic pagination
* component for navigating between pages.
*/
(function( $ ){
$.fn.getParameterByName = function (name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
@davidemaser
davidemaser / paginator.html
Last active January 20, 2016 15:33
Paginator demo
<div id="demo"></div>
<script>
$(this).paginator({
total:24,
visible:5,
start:1,
getURI:false,
uriOffset:'offset',
speed:200,
parent:'#demo',
@davidemaser
davidemaser / parallax.js
Last active January 19, 2016 22:14
Parallax FN
/**
* Created by david-maser on 30/12/14.
*
* jQuery Parallax plugin that creates a parallax enabled
* page from data pulled from an external json file.
* The json file (elements.json) contains all information
* for the section blocks.
*/
(function( $ ){
$.fn.parallax = function (options) {
@davidemaser
davidemaser / parallax.html
Last active January 20, 2016 15:28
parallax plugin initiator
<script>
$(document).ready(function(){
$(this).parallax();
});
</script>
@davidemaser
davidemaser / parallax.json
Last active January 20, 2016 15:28
Parallax plugin JSON structure
{"image":[
{
"src":"assets/images/arcterys.png",
"width":2000,
"height":1125,
"id":"home",
"type":"background",
"tag":"article",
"text":"This is the home section",
"textSize":30,
@davidemaser
davidemaser / organizr.js
Last active August 29, 2015 14:25
Organizr is an advanced jQuery plugin that can build and populate an html page with data pulled from a single json file. Organizr can also import into your page other javascript libraries and css files allowing you to build a complex html page just by specifying it's structure and content in a json file.
/**
* Created by david-maser on 31/12/14.
*/
(function( $ ) {
$.fn.organizr = function (options) {
var defaults = {
parent: 'body',
margin: 0,
padding: 0,
dataType: 'json',