Skip to content

Instantly share code, notes, and snippets.

View treykane's full-sized avatar

Trey Kane treykane

View GitHub Profile
@treykane
treykane / diagonal-strikethrough.scss
Created October 15, 2015 15:40
Diagonal Strikethrough
// This could be used for many things, however in my case, this was use to show a price that was slashed through.
.slashed-rate {
display: inline-block;
padding-top: 10px;
color: $grey-darker;
.currency {font-size: 15px;}
.dollars {font-size: 30px;}
.frequency {font-size: 10px;}
&::before {
@treykane
treykane / AJAX-Response-Handling.js
Last active December 17, 2015 15:48
Parse and handle a basic AJAX response.
$.post("ajax_rope_check.php", { //FORM AJAX
street: s.step_two_street.val(),
city: s.step_two_city.val(),
state: s.step_two_state.val(),
zip: s.step_two_zip.val()
})
.done(function(response){ //AJAX RESPONSE
response = $.parseJSON(response);//CHANGE STR TO OBJ
if(response.serviceable === true) {
@treykane
treykane / Modal-Animation-&-Check-Fields-For-Value.js
Last active December 17, 2015 15:49
Animate a modal transition, with step counter.
var modal_steps = (function() {
// variables
var s = {
step_one: $('.address-check__step.step-1'),
step_two: $('.address-check__step.step-2'),
step_three: $('.address-check__step.step-3'),
step_one_bar_mask: $('.js-step-bar-1 .bar-mask'),
step_two_bar_mask: $('.js-step-bar-2 .bar-mask'),
step_one_circle: $('.step-circle.circle-1'),
@treykane
treykane / Click to activate (jQuery).markdown
Last active December 17, 2015 19:33
Click to activate (jQuery)

Click to activate (jQuery)

Simple click to activate demo with jQuery. Allows the user to click the element to toggle it on or off, or click anywhere to deactivate.

Using "Excluded Areas" to allow user interaction with the revealed content.

A Pen by Trey Kane on CodePen.

License.

@treykane
treykane / Trey's BlackBoard Theme
Created October 24, 2013 01:38
This is a Gist of my Custom Version of BlackBoard for Sublime Text
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>author</key>
<string>Domenico Carbotta</string>
@treykane
treykane / hr-lines-on-sides-of-title.scss
Last active January 6, 2016 13:54
Horizontal Lines on each side of title - DON'T FORGET TO HIDE YOUR OVERFLOW
.hero-cta-title {
display: inline-block;
position: relative;
&:before, &:after {
content: "";
position: absolute;
border-top: 1px solid white;
top: 9px;
width: 200%;
}//. &:before, &:after
@treykane
treykane / fake-border-radius.scss
Created January 6, 2016 13:56
Border on element with border radius 50% - border is faked
//Red Circle Background
.circle-red{
@include linear-gradient(#E71323, #5D0006);
border-radius: 50%;
box-shadow: ;
width: 250px;
height: 250px;
z-index: 1;
&:after { //BORDERS WITH BORDER RADUIS WORK AROUND
@include linear-gradient(#FB323C, #990007);
@treykane
treykane / cookie-n-stuff.js
Created June 24, 2016 16:03
Do some stuff based on the status of a cookie
@treykane
treykane / sticky.css
Last active September 29, 2016 18:55
JQuery - Sticky Element on scroll when it reaches the top of the browser window
.is-sticky {
position: fixed; /* why it sticks */
top: 0; /* can be adjusted as needed */
margin: 0;
z-index: 999; /* be on top of all the things */
}/* is-sticky */
@treykane
treykane / set-cookie.js
Last active October 5, 2016 16:22
Set a basic cookie with JS