This script hides any element who's content doesn't match the words typed in the input field.
A Pen by Agustín Amenabar on CodePen.
This script hides any element who's content doesn't match the words typed in the input field.
A Pen by Agustín Amenabar on CodePen.
var Common = { | |
addEvent : function(ele, evType, fn, useCapture) { | |
if (ele.addEventListener) { | |
ele.addEventListener(evType, fn, useCapture); | |
return true; | |
}else if (ele.attachEvent) { | |
var r = ele.attachEvent('on' + evType, fn); | |
return r; | |
} else { | |
ele['on' + evType] = fn; |
<head> | |
<title>Título</title> | |
<!--[if lt IE 8 ]><link rel="stylesheet" href="/styles/legacy-ie.css" /><![endif]--> | |
<!--[if gt IE 9]><!--><link rel="stylesheet" href="/styles/styles.css" /><!--<![endif]--> | |
</head> |
// It will add the appropriate class to <html> node | |
// This should only be used in combination with media queries detecting wide screens, because it is not reliable. | |
// Always use with a mobile-first approach | |
var root = document.documentElement; | |
if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) { | |
root.className += ' touch'; | |
} else { | |
root.className += ' no-touch'; | |
} |
<?php | |
/** | |
* Una simple función para obtener los costos de envío de un paquete mediante Chilexpress. | |
* Como única dependencia se necesita de la liberia PHP Simple HTML DOM Parser: http://simplehtmldom.sourceforge.net/ | |
* | |
* Para poder comunicarse con Chilexpress, se debe tener la lista de todas las comunas que ellos utilizan y el código | |
* que le asignan a cada una. En este archivo, al final, podrás encontrar el listado, el cual podrás parsear fácilmente | |
*/ |
<?php | |
/** | |
* Útil cuando se necesita calcular el tamaño de un paquete a enviar en el cual | |
* dentro van N productos con distintas medidas. | |
* | |
* Con este algoritmo se puede obtener el tamaño de la caja contenedora final necesaria. | |
*/ | |
$dimensiones = array(0, 0, 0); // Largo, alto, ancho |
<?php | |
$dir = ".";//"path/to/targetFiles"; | |
$dirNew = "viejo2014";//path/to/destination/files | |
// Open a known directory, and proceed to read its contents | |
if (is_dir($dir)) { | |
if ($dh = opendir($dir)) { | |
while (($file = readdir($dh)) !== false) { | |
echo '<br>Archivo: '.$file; | |
//exclude unwanted | |
if ($file=="move.php")continue; |
<?php | |
$url = 'http://g.m0.cl/sistema/ci_assaabloy.zip'; | |
$path = 'importado.zip'; | |
$fp = fopen($path, 'w'); | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_FILE, $fp); | |
$data = curl_exec($ch); |
.clearfix:after { | |
content:""; | |
display:table; | |
clear:both; | |
} | |
/* | |
From: | |
http://cssmojo.com/latest_new_clearfix_so_far/ | |
*/ |
/** | |
* MIXIN n-of-m-columns | |
* calculates the adequate percentage width and gutter percentage | |
* @param $n: number of columns to calculate | |
* @param $m number of total columns in the row | |
**/ | |
$gridGutter: 24px; | |
$defaultWidth: 984px; | |
@mixin n-of-m-columns($n:1, $m:3){ |