Skip to content

Instantly share code, notes, and snippets.

View equijada001's full-sized avatar

Erick Quijada equijada001

  • The Engage Group
View GitHub Profile
@equijada001
equijada001 / array iteration
Created January 20, 2015 17:38
Code snippet to remove .00 from dynamic asks on convio forms
var a = jQuery("div.donation-level-amount-container");
jQuery.each(a, function(index, value) {
var nv = jQuery(value).text().replace(/\.[0-9][0-9]/g, "");
jQuery(value).text(nv);
});
@equijada001
equijada001 / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@equijada001
equijada001 / Convio embedded survey
Last active August 29, 2015 13:59
Convio embedded survey - duplicates the email address of user into hidden CRI email field
<!-- Bringing in jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<convio:session name="28" param="EMBED:14841"></convio:session>
<script>
$(document).ready(function() {
//$("input#cons_email").parents("tr.old-school").addClass("hide");
$("input#cons_email").parents("tr.old-school").hide();
$('input[name="3340_14841_3_12143"]').bind("keyup change", function (){
@equijada001
equijada001 / overTable CSS - Chrome fix
Created October 8, 2013 18:05
Controlling table width in convio - this css rule targets the table that gets populated by donation form pages
TABLE.overTable {
display: inline-block !important;
overflow: hidden;
width: 940px !important;
}
@equijada001
equijada001 / External file on Drupal page
Created August 8, 2013 23:41
This script is used to set an external file into a specific page on a drupal site. This example references a .js file.
<? drupal_set_html_head('<script type="text/javascript" src="//red-engine.s3.amazonaws.com/CAS/GA_content_exp_code.js"></script>');?>
@equijada001
equijada001 / Mobile Sniffer Code
Created March 22, 2013 19:57
This sniffer code looks to see if the viewer is on a mobile device and redirects them to a specified URL. When used in Convio you'll want to redirect to a page in page-builder that has been set up for mobile styling. This will include the mobile page and a mobile wrapper.
<!-- Use this code to redirect mobile visitors to a mobile specific form. Make sure to replace the redirect URL with the correct mobile form URL. This script also captures all query string data and forwards it to the mobile form.
<script type="text/javascript">
var uri = 'URLGoesHere' + document.location.search;
(function(a,b){if(/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|meego.+mobile|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez
@equijada001
equijada001 / LinkedIn Share
Created March 13, 2013 15:25
LinkedIn Share
http://www.linkedin.com/shareArticle?mini=true&url={articleUrl}&title={articleTitle}&summary={articleSummary}&source={articleSource}
@equijada001
equijada001 / Bootstrap Dropdown Menu Hover Affect
Created March 5, 2013 18:40
jQuery snippet that adds a hover affect for a dropdown menu parent in Bootstrap
//Add Hover effect to menus
jQuery('ul.nav li.dropdown').hover(function() {
jQuery(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn();
}, function() {
jQuery(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut();
});
@equijada001
equijada001 / Facebook share - Image designation
Created March 1, 2013 17:45
Demonstrates different ways to display a specific image in a Facebook share link
<meta property="og:image" content="https://example.com/image.png" />
or directly inline (email) and for older versions of the facebook sharer
<link rel="image_src" type="image/jpeg" href="https://example.com/image.png" />
or
http://www.facebook.com/sharer.php?s=100&p[title]=titlehere&p[url]=http://www.yoururlhere.com&p[summary]=yoursummaryhere&p[images][0]=http://www.urltoyourimage.com
@equijada001
equijada001 / Twitter Share
Created December 20, 2012 22:37
Twitter Share
http://twitter.com/intent/tweet?text=Message%20content.%20Bit.ly