Skip to content

Instantly share code, notes, and snippets.

View adardesign's full-sized avatar
🎯
Focusing

Eliezer Braun adardesign

🎯
Focusing
View GitHub Profile
@adardesign
adardesign / LPAffiliates.js
Created November 13, 2012 18:24
lpAffiliates
(function() {
var searchTextInput, searchTerm;
function doSearch() {
searchTerm = searchTextInput.value || "";
var afKey = document.getElementById("LP_afKey").value || "";
url = "http://www.leisurepro.com/Catalog.aspx?op=gcsSearch&Term=" + searchTerm + "&afKey="+afKey;
window.open(url);
}
function addEventHandler(node, type, fn) {
@adardesign
adardesign / MobileShopMoreFunctionality
Created December 3, 2012 21:14 — forked from anonymous/MobileShopMoreFunctionality
Shop More functionality for mobile
/* Begin Adrma storage utility */
adrma = window.adrma || {};
adrma.storage = {
init: function () {
},
supported: function () {
try {
return 'localStorage' in window && window['localStorage'] !== null;
Object.keys(localStorage).forEach(function(key) { delete localStorage[key]; });
someNameSpace = {
//...
processForm: function (form) {
return JSON.stringify(form.serializeObject(function (key, val) {
return {
name: key,
value: encodeURIComponent(val)
};
}));
}
$('.tooltip').each(function() {
var thistip = $(this);
var thehash = $(thistip).attr('id');
$('.theoptions').append("<div class='tooltipcontent "+thehash+"' style='display:none'></div>");
$(".tooltipcontent."+thehash).load('tooltips/data.php #'+thehash, function(){
var thehtml = $(".tooltipcontent."+thehash).html().replace(/"/g, '\'');
//alert(thehtml)
$('.tooltip').each(function() {
var thistip = $(this);
var thehash = $(thistip).attr('id');
$('.theoptions').append("<div class='tooltipcontent "+thehash+"' style='display:none'></div>");
$(".tooltipcontent."+thehash).load('tooltips/data.php #'+thehash, function(){
var thehtml = $(".tooltipcontent."+thehash).html().replace(/"/g, '\'');
//alert(thehtml)
$(thistip).attr('title', thehtml).tooltipster('update', thehtml);
function RR.jsonCallback(){
//Process Placements provided in RR.data.JSON.placements
console.dir(RR.data.JSON.placements);
}
Example contents of RR.data.JSON:
{
"placements": [{
<div class="listingNavWidget widget">
<h2 class="widgetHeader icon-calendar">Store Schedule</h2>
<div class="widgetContent">
<div class="subSection todaysDateSection">
<h4>Wednesday<br>
Feb 6th, 2013</h4>
</div>
/*!
* typeahead.js 0.9.1
* https://github.com/twitter/typeahead
* Copyright 2013 Twitter, Inc. and other contributors; Licensed MIT
*/
(function($) {
var VERSION = "0.9.1";
var utils = {
isMsie: function() {
var match = /(msie) ([\w.]+)/i.exec(navigator.userAgent);
<!DOCTYPE html>
<!--[if IE 8]> <html lang="sv-SE" class="no-js ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="sv-SE" class="no-js"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<title>Breakpoint detection test</title>
<style type="text/css" media="screen">
@media screen and (min-width: 320px) {
#page:after {
content: 'mobile-small'; /* represent the current width-bracket */