Skip to content

Instantly share code, notes, and snippets.

View treykane's full-sized avatar

Trey Kane treykane

View GitHub Profile
@treykane
treykane / toggle-class-on-stuff.js
Last active October 10, 2021 20:28
Toggle a class, and remove the class when you click ANYWHERE ELSE on the document.
$( document ).ready(function() {
$(function() { // TOGGLE CLASS ON ELEMENT
$(".tile-top").on("click", function() {
$(this).toggleClass('active'); });
}); //END TOGGLE CLASS
$(function() { // REMOVE CLASS WHEN YOU CLICK, EXCLUDE ELEMENTS
var ignore= Array(".tile-top", // elements to ignore
".tile-bottom");

Keybase proof

I hereby claim:

  • I am treykane on github.
  • I am treykane (https://keybase.io/treykane) on keybase.
  • I have a public key ASAsh63tvBHtfNWTYRu9RhxkhtnnK7_az16qKvPnV0_SbQo

To claim this, I am signing this object:

@treykane
treykane / treys-gulpfile.js
Last active December 20, 2018 19:10
My basic gulp file
// npm install gulp
//---- TODO'S ----//
// TODO: smarter linting
// Include gulp
var gulp = require('gulp');
// Include Our Plugins
@treykane
treykane / set-cookie.js
Last active October 5, 2016 16:22
Set a basic cookie with JS
@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 / cookie-n-stuff.js
Created June 24, 2016 16:03
Do some stuff based on the status of a cookie
@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 / 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 / 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 / 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.