Skip to content

Instantly share code, notes, and snippets.

View Asherlc's full-sized avatar

Asher Cohen (Editors) Asherlc

View GitHub Profile
@Asherlc
Asherlc / salsa
Created April 26, 2012 18:40
Salsa
<?
var page_id;
var page;
var title;
var description;
var page_url;
//Signup page
if (Request.getParameter("signup_page_KEY")) {
page_id=Request.getParameter("signup_page_KEY");
@Asherlc
Asherlc / SalsaV2
Created April 26, 2012 22:57
SalsaV2
<?
var title;
var description;
//Get all url parameters
var params = Request.getParameterList();
//Find the very first parameter (always page key), grab the name and value
var page_param = params[0]['name'];
var page_id = params[0]['value'];
//Strip out the '_KEY' string, so we get just the page type
<?
var title;
var description;
var image
var params = Request.getParameterList();
var key_pattern = /_KEY/i;
for(var index in params) {
if index.match(key_pattern)
@Asherlc
Asherlc / SalsaSucks
Created May 10, 2012 21:11
SalsaSucks
<?
//Initialize a couple of variable's we'll need later
var title = 'Page',
description = 'Default description',
image,
page_type,
page,
page_url,
page_param,
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
(function ($) {
$.salsaform = function () {
console.log($('#foo'));
};
})(jQuery);
$(function(){
$.salsaform();
<script type="text/javascript" src="https://assets.trilogyinteractive.com/shared/jquery-salsaforms-1-0/salsaforms.js"></script>
<script>$(document).ready(function(){salsaForm({validate:true,prettify:true,restructure:true,responsive:true,mobile:true,buttonText:false,submit:false,dynamic:false,buttonText:'Sign up!'});});</script>
@Asherlc
Asherlc / Lightbox
Created August 4, 2012 00:03
Lightbox
<script type="text/javascript">
$(document).ready(function() {
$('.fancybox').fancybox();
$("#inline").fancybox({titleShow: false}).trigger('click');
});
</script>
<style type="text/css">
.fancybox-custom .fancybox-skin {
@Asherlc
Asherlc / boxer
Created August 7, 2012 16:17
boxer
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body bgcolor="#ffdfa2">
<p><style type="text/css">
p {margin: 1em 0;}
#outlook a{padding:0;}
body{width:100% !important; margin:0; padding:0; -webkit-text-size-adjust:none; -ms-text-size-adjust:none;}
@Asherlc
Asherlc / Auto Source Code
Created September 13, 2012 18:11
Auto Source Code
<script type="text/javascript">
$(function() {
$('#signup').trilogyForm({
redirectOptions: {
parameterMap: {
refcode: 'ReferrerSourceCode',
sc: 'ReferrerSourceCode'
}
}
});
@Asherlc
Asherlc / test
Created September 13, 2012 23:47
test
$(document).ready(function () {
var original = $('.signerCount').html()
var text = original.replace('total signers','citizen co-sponsors and counting')
$('.signerCount').html(text)
})