This code how to replace the traditional radio-buttons, for custom images. You can do the same with checkboxes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object | |
Exception | |
NoMemoryError | |
ScriptError | |
LoadError | |
NotImplementedError | |
SyntaxError | |
SignalException | |
Interrupt | |
StandardError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Video responsive</title> | |
<link rel="stylesheet" type="text/css" href="css/ratio.css"> | |
</head> | |
<body> | |
<div class="video"> | |
<iframe width="560" height="315" src="https://www.youtube.com/embed/PRV_0NAK9SI" frameborder="0" allowfullscreen></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Form login</title> | |
<link rel="stylesheet" type="text/css" href="css/styles.css"> | |
</head> | |
<body> | |
<div class="content"> | |
<h1>Login to site</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Transform</title> | |
<link rel="stylesheet" type="text/css" href="css/styles.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="skew"><img src="http://lorempixel.com/500/250"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* escribe un párrafo con un efecto de máquina de escribir | |
** usando setInterval(callback, time) | |
** parámetro str una cadena de texto | |
*/ | |
var writing = function(str) { | |
// array de todos los carácteres del string | |
// ej. str = 'Hola'; | |
// str.split(''); genera un array ['H', 'o', 'l', 'a'] | |
var arrFromStr = str.split(''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* contador regresivo | |
** parametro ms númerico, representa milisegundos | |
*/ | |
var countDown = function (ms) { | |
// referencia al método setInterval(callback, time) | |
var myCountDown = setInterval(function () { | |
// variables para minutos y para segundos | |
var minutes = Math.floor(ms / (1000 * 60)), | |
seconds = Math.floor((ms % (1000 * 60)) / 1000); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let elements = document.querySelectorAll('div'), | |
callback = (el) => { console.log(el); }; | |
// Spread operator | |
[...elements].forEach(callback); | |
// Array.from() | |
Array.from(elements).forEach(callback); | |
// for...of statement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://medium.com/@hackvan/entendiendo-la-metaprogramaci%C3%B3n-con-ruby-7a0360ee67e7 | |
=begin | |
# Class implementa algunos interesantes métodos de introspección como: | |
class # Retorna el objeto de clase a la que pertenece el objeto instanciado | |
superclass # Retorna el objeto de clase del cual hereda la clase del objeto instanciado | |
ancestors # Retorna un Array con el listado de la cadena de ancestros | |
instance_variables # Retorna un Array con el listado de las variables de instancia creadas | |
# en la clase del objeto. |
OlderNewer