Skip to content

Instantly share code, notes, and snippets.

View jorgechavz's full-sized avatar

Jorge Chavez jorgechavz

View GitHub Profile
@jorgechavz
jorgechavz / map.html
Last active December 23, 2015 00:01
Build google map from JavaScript (no iframe)
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQu1pFTW2ni8iwdASum9iueNpCRoG3HCY&sensor=false"></script>
<script>
var mapa = document.getElementById("mapa-frame");
if(mapa){
var latlong=new google.maps.LatLng("28.6525409", "-106.1142289"),
mapOptions = {
center: latlong,
zoom: 14,
scrollwheel: false,
@jorgechavz
jorgechavz / Script for contact
Last active January 7, 2016 17:24
Contact mail System
$("#contact-form").submit(function(e){
e.preventDefault();
$(".error").hide();
$this = $(this);
var data = $(this).serialize(),
url = $(this).attr("action");
$.ajax(url,{
data: data,
type: "POST",
@jorgechavz
jorgechavz / CSS after line
Last active October 13, 2015 17:45
CSS lines used into websites, it is being use Stylus
.e-l
&.e-l-b
&:after
border-bottom 1px solid white
&.e-l-small
&:after
width 10%
&.e-l-medium
&:after
width 30%
//Apply this to the containter
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="filters">
<defs>
<filter id="blur">
<feGaussianBlur in="SourceGraphic" stdDeviation="20" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9" result="goo" />
<feComposite in="SourceGraphic" in2="goo" operator="atop"/>
</filter>
</defs>
<style>
/* Define the height parent */
#parent{
height: 500px;
}
.astable{
width: 100%;
height: 100%;
display: table;
.ascell{
@jorgechavz
jorgechavz / gist:1015467773de5e008bbf
Created June 19, 2015 23:50
Scrolling to HTML element
<a href="#" data-go="#node-element" class="go">Go to</a>
<script type="text/javascript">
$(".go").click(function(e){
//We prevent the default scroll
e.preventDefault();
var $this = $(this),
to = $this.attr("data-go"),