Skip to content

Instantly share code, notes, and snippets.

View dviramontes's full-sized avatar
〰️
failing forward

David Viramontes dviramontes

〰️
failing forward
View GitHub Profile
@dviramontes
dviramontes / checklocal_storage.js
Created July 16, 2013 16:52
checklocal_storage support
// modernizr check
// for localStorage support
// if (Modernizr.localstorage){
// log("localStorage is available");
// }else{
// log("No native support for localStorage, load dojox.storage solution ...");
// }
@dviramontes
dviramontes / gist:6255051
Created August 17, 2013 03:07
Trumba code for christian :)
part of main.min.js
// adds Trumba spud to Homepage events <div>
$Trumba.addSpud({
webName: "msudenver-events-calendars",
spudType : "upcoming" ,
teaserBase : "http://www.trumba.com/calendars/msudenver-events-calendars",
spudId : "homepage_events"
})
@dviramontes
dviramontes / gist:6255656
Created August 17, 2013 07:00
Modernizr Detect support for media queries on IE 7, 8, old IE (die ie!, die)
Modernizr.mq("only all")
@dviramontes
dviramontes / gruntnpmload.js
Created August 18, 2013 00:37
Grunt Load Npm Task with one funtion
module.exports = function(grunt){
// instead of grunt.loadNpmTask one by one , use
require('matchdep').filterDev("grunt-*").forEach(grunt.loadNpmTask);
}
@dviramontes
dviramontes / click.js
Created August 22, 2013 17:28
makes anything with class .clickable, clickable
$(".clickable").click(function(event) {
event.preventDefault();
if ($(this).data().href) {
return window.open($(this).data().href, "_self");
}
});
$(document).ready(function () {
var iec = new IECompatibility();
alert('IsIE: ' + iec.IsIE + '\nVersion: ' + iec.Version + '\nCompatability On: ' + iec.IsOn);
});
function IECompatibility() {
var agentStr = navigator.userAgent;
this.IsIE = false;
this.IsOn = undefined; //defined only if IE
this.Version = undefined;
// for smallest jquery include ever...
function $(expr, cond){ return (con || document).querySelector(expr); }
@dviramontes
dviramontes / code.js
Last active December 26, 2015 04:09
email validation with jquery plugin
// validate email address
$("#ss-form").validate({
// validate rule
rules : {
email : {
required: true,
email: true
}
},
@dviramontes
dviramontes / gist:7683882
Created November 27, 2013 21:53
homepage.less
// @import "./utils/functions.less" ;
// @import "./utils/actionSection.less" ;
// @import "./utils/captions.less" ;
// @import "./utils/colors.less" ;
// TESTIMONIAL IMG
// ---------------
.testimonial img{
width: 100%;
body{
padding-top: 100px;
font-size:50px;
}