Skip to content

Instantly share code, notes, and snippets.

View lizardking8610's full-sized avatar

Robert lizardking8610

View GitHub Profile
@lizardking8610
lizardking8610 / infusion_hide_paypal.js
Last active May 18, 2017 17:41
code to hide paypal link in infusionsoft order forms
<script type="text/javascript">// <![CDATA[
jQuery(window).bind("load", function() {
jQuery("#checkoutWithPayPalLink").hide();
jQuery("#payPalType").parent().hide();
jQuery(".switchPaymentSelectionLink").hide();
});
// ]]></script>
@lizardking8610
lizardking8610 / hover.css
Created May 17, 2017 03:37
Hover Effects wiht CSS
.hvr-grow-shadow {
box-shadow: 0 0 1px transparent;
display: inline-block;
transform: perspective(1px) translateZ(0px);
transition-duration: 0.3s;
transition-property: box-shadow, transform;
vertical-align: middle;
}
.hvr-grow-shadow:hover,
@lizardking8610
lizardking8610 / squareButton.html
Created May 18, 2017 16:44
Square Hover Buttons with CSS Effects
<div id="jcfctaheadercontainer">
<ul>
<li><a href="#" class="hvr-shutter-in-vertical">Press</a></li>
<li><a href="#" class="hvr-rectangle-in">Share</a></li>
<li><a href="#" class="hvr-grow-shadow">Donate</a></li>
</ul>
</div>
@lizardking8610
lizardking8610 / roundedButton.css
Created May 18, 2017 16:45
Rounded Buttons with CSS effects
.hvr-grow-shadow {
box-shadow: 0px 0px 1px transparent;
display: inline-block;
transform: perspective(1px) translateZ(0px);
transition-duration: 0.3s;
transition-property: box-shadow, transform;
vertical-align: middle;
}
.hvr-grow-shadow:hover,
@lizardking8610
lizardking8610 / addremovehover.js
Created May 18, 2017 16:50
jQuery Add/Remove Class on Hover
$('#elm').hover(
function(){ $(this).addClass('hover') },
function(){ $(this).removeClass('hover') }
)
@lizardking8610
lizardking8610 / detectApply.js
Created May 18, 2017 16:53
jQuery: Detect Browser and Apply Classes to HTML
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(c/a))+String.fromCharCode(c%a+161)};while(c--){if(k[c]){p=p.replace(new RegExp(e(c),'g'),k[c])}}return p}('Ö ¡(){® Ø={\'¥\':¡(){¢ £.¥},\'©\':{\'±\':¡(){¢ £.©.±},\'¯\':¡(){¢ £.©.¯}},\'¬\':¡(){¢ £.¬},\'¶\':¡(){¢ £.¶},\'º\':¡(){¢ £.º},\'Á\':¡(){¢ £.Á},\'À\':¡(){¢ £.À},\'½\':¡(){¢ £.½},\'¾\':¡(){¢ £.¾},\'¼\':¡(){¢ £.¼},\'·\':¡(){¢ £.·},\'Â\':¡(){¢ £.Â},\'³\':¡(){¢ £.³},\'Ä\':¡(){¢ £.Ä},\'Ã\':¡(){¢ £.Ã},\'Å\':¡(){¢ £.Å},\'¸\':¡(){¢ £.¸}};$.¥=Ø;® £={\'¥\':\'¿\',\'©\':{\'±\':²,\'¯\':\'¿\'},\'¬\':\'¿\',\'¶\':§,\'º\':§,\'Á\':§,\'À\':§,\'½\':§,\'¾\':§,\'¼\':§,\'·\':§,\'Â\':§,\'³\':§,\'Ä\':§,\'Ã\':§,\'Å\':§,\'¸\':§};Î(® i=0,«=».ì,°=».í,¦=[{\'¤\':\'Ý\',\'¥\':¡(){¢/Ù/.¨(°)}},{\'¤\':\'Ú\',\'¥\':¡(){¢ Û.³!=²}},{\'¤\':\'È\',\'¥\':¡(){¢/È/.¨(°)}},{\'¤\':\'Ü\',\'¥\':¡(){¢/Þ/.¨(°)}},{\'ª\':\'¶\',\'¤\':\'ß Ñ\',\'¥\':¡(){¢/à á â/.¨(«)},\'©\':¡(){¢ «.¹(https://cdn.css-tricks.com/ã(\\d+(?:\\.\\d+)+)/)}},{\'¤\':\'Ì\',\'¥\':¡(){¢/Ì/.¨(«)}},{\'¤\':\'Í\',\'¥\':¡(){¢/Í/.¨(°)}},{\'
@lizardking8610
lizardking8610 / mousetoelement.js
Created May 18, 2017 16:55
jQuery: determine distance of mouse from element
(function() {
var mX, mY, distance,
$distance = $('#distance span'),
$element = $('#element');
function calculateDistance(elem, mouseX, mouseY) {
return Math.floor(Math.sqrt(Math.pow(mouseX - (elem.offset().left+(elem.width()/2)), 2) + Math.pow(mouseY - (elem.offset().top+(elem.height()/2)), 2)));
}
@lizardking8610
lizardking8610 / doesexist.js
Last active May 18, 2017 16:59
jQuery: does element exists
if ( $('#myElement').length ) {
// it exists
}
//>0 was not required
//if ($('#myElement').length > 0) {
// it exists
}//
@lizardking8610
lizardking8610 / loading.html
Created May 18, 2017 17:00
jQuery: display loading graphic while page renders
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset='UTF-8'>
<title>Simple Loader</title>
<style>
/* This only works with JavaScript,
@lizardking8610
lizardking8610 / imagefademenu.css
Created May 18, 2017 17:03
jQuery: image fade on nav into another image
ul#menu li a{float:left;display:block;background:url("images/menu.png") no-repeat;width:150px;text-indent:-9999px;height:50px}
ul#menu li#home a{background-position:0px 0px}
ul#menu li#about a{background-position:-150px 0px}
ul#menu li#services a{background-position:-300px 0px}
ul#menu li#contact a{background-position:-450px 0px}
ul#menu li a span {background:url("images/menu.png");height:50px;display:block}
ul#menu li#home a span{background-position:0px -50px}
ul#menu li#about a span{background-position:-150px -50px}
ul#menu li#services a span{background-position:-300px -50px}