Skip to content

Instantly share code, notes, and snippets.

View cbertelegni's full-sized avatar

Cristian Bertelegni cbertelegni

View GitHub Profile
@cbertelegni
cbertelegni / reset.min.css
Last active December 16, 2015 00:19
CSS RESET
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video,input{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0;} article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;} body{line-height:1;} ol,ul{list-style:none;} blockquote,q{quotes:none;} blockquote:before,blockquote:after,q:before,q:after{content:none;} table{border-collapse:collapse;border-spacing:0;} input:focus{border:none;} *{outline:none;}
@cbertelegni
cbertelegni / index.html
Created April 19, 2013 16:27
Mover div u otro obj html cuando el scroll que lo contiene pasa por encima.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
#cont { width: 600px;margin: 0 auto; background: orange; position: relative;}
#cont div{ height: 50px; width: 400px;margin: 20px auto; }
button { position: absolute; top: 50px; left: 50%}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
@cbertelegni
cbertelegni / index.html
Last active December 16, 2015 10:39
Plugin Jquery para UL anidadas. show & hide ul
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@cbertelegni - test</title>
<meta name="description" content="" />
<style type="text/css">
li ul {display: none;}/* importante que las ul anidadas esten en display: none */
li {cursor: pointer;}
</style>
@cbertelegni
cbertelegni / generador_iframes.html
Created April 24, 2013 17:57
HTML para generar codigos iframes
<!-- en desarrollo!!! -->
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8" />
<title>Generador de Iframes</title>
<style type="text/css">
body { font-family: arial}
textarea { width: 800px; margin: 30px auto; display: block; padding: 10px; border-radius: 5px; text-align: center; }
iframe { margin: 0 auto}
@cbertelegni
cbertelegni / README.md
Last active December 17, 2015 08:59
Ejemplos de HACKS para Internet Explorer

Ejemplos de hack CSS

@cbertelegni
cbertelegni / README.md
Last active April 19, 2017 04:20
Convierte tabla #HTML a #CSV y exporta la misma.

$.toCSV Plugin: Convierte tabla HTML a CSV y exporta la misma.

Ejemplo de uso:

  • incluir jquery.toCSV.min.js en el head.
$("table").toCSV();
@cbertelegni
cbertelegni / README.md
Last active December 18, 2015 08:19
Mini social share plugin.

Mini plugin para compartir urls en redes sociales.

Ejemplo de uso:

var conf_share = {
   text: "Esto es un test!!",
	hashtag: "ejemplo",
	configWindow: null // toma el valor seteado por el plugin... 
};
@cbertelegni
cbertelegni / jquery.tooltip.js
Created July 1, 2013 16:11
Jquery plugin para tooltip
(function($){
// tooltip
$.tooltip = function (objetoOver, tooltip, callBack){
// objetoOver
// tooltip
// callBack
var postion={ left:0, top:0, parentW: objetoOver.parent().width(), parentH: objetoOver.parent().height() };
objetoOver.hover(function(e){
if(callBack)
@cbertelegni
cbertelegni / README.md
Last active December 28, 2016 22:09
Extensión de la clase Number para dar formato a los números.

Extensión de la clase Number para dar formato a los números en Javascript.

Forma de uso:

var n = 15425.56;
var output = n.format(2, ",", ".");
alert(output); // el resultado es "15.425,56"

Tomar los parámetros GET y convertirlos en un objeto Javascript.


** Supongamos que esta es nuestra url: **

http://www.un_sitio.com/products?ae=Folder&t=IPF.Note&id=LgAAAAC4WomtSDsgTYc%2fCN%2fYWngjAQB2IKiJwLMsSYOCiHVjWIScAHX0ghq%2bAAAB&slUsng=2&mru=1

var get_obj = get_to_obj(location.search);