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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/** | |
* Base styles to get us started... | |
*/ | |
.container { | |
background-color: black; | |
box-sizing: border-box; | |
text-align: center; | |
} | |
.item { |
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
// expressions-----------------------> | |
var mathResult = 1*10 + (200 / 3); | |
// an expression uses operators to give you a return value | |
//statement | |
if(false === true){ | |
console.log('WTF'); | |
} | |
else{ |
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
//SORTS ITEMS USING ANIMATION LIBRARY | |
$(window).load(function() { | |
var box = $('.box'), | |
boxContainer = $('.boxes'), | |
section = $('.sort-section'), | |
containerHeight = $('.adjustable-height'), | |
boxClassFilter, | |
showThese; | |
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($, window, document) { | |
function toggleMenus() { | |
$('.reveal_js--trigger[data-target="drop1"][data-action="toggle"]').on('click', function(e) { | |
var clicked_obj = $(this), | |
target = clicked_obj.data('target'), | |
target_obj = $('.reveal_js--content[data-content="' + target + '"]'), | |
header_obj = $('#header'), |
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($) { | |
//dynamically load in popular block as object | |
function MostPopular(popularBlock) { | |
var self = this; | |
if (popularBlock == undefined) { | |
var popularBlock = $('.gi-table-wrap'); | |
} | |
this.lazyPopular = new Waypoint({ |
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
//a simple script to convert a csv to xml | |
<?php | |
$csvfile = 'DispensariesNEW.csv'; | |
$xmlfile = 'dispensariesoutput.xml'; | |
// Open csv to read as array | |
$csv = array_map('str_getcsv', file($csvfile)); | |
array_walk($csv, function(&$a) use ($csv) { |
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
//using gmaps api to display locations with custom markers around vancouver | |
(function($) { | |
var marker_data; | |
$(document).ready(function() { | |
var jqxhr = $.get(document.getElementById('special-issues--map-canvas').getAttribute('data-src'), {}, function(data) { | |
marker_data = data; | |
}, 'text') | |
.error(function(jqXHR, textStatus, errorThrown) { | |
}).done(function() { |
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 gs_ads_menu() { | |
$items = array(); | |
$items['admin/bookings/takeovers'] = array( | |
'type' => MENU_CALLBACK, | |
'description' => 'A form for booking ad takeovers.', | |
'page callback' => 'gs_ads_custom_page_display', | |
'access callback' => 'user_access', | |
'access arguments' => array('eck add booking takeover entities'), | |
'file' => 'includes/gs_ads.form.inc' |
OlderNewer