Skip to content

Instantly share code, notes, and snippets.

@furenku
Last active August 27, 2016 19:05
Show Gist options
  • Save furenku/afb735981d975bee1ce56cc5eaaebbc9 to your computer and use it in GitHub Desktop.
Save furenku/afb735981d975bee1ce56cc5eaaebbc9 to your computer and use it in GitHub Desktop.
intro-js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Introducción JS</title>
<style>
body,html {
padding: 0;
margin: 0;
overflow-y: hidden;
}
div {
display: inline-block;
float: left;
}
* { outline: 1px solid #eff; }
</style>
</head>
<body>
<header>
<!-- button#boton.boton{Haz click} -->
<button id="boton" class="boton">
Haz click
</button>
</header>
<!-- section#cajas -->
<section id="cajas">
<div class="caja"></div>
<div class="caja"></div>
<div class="caja"></div>
</section>
<script src="recursos/jquery-3.1.0.min.js"></script>
<script src="js/introjs.js"></script>
</body>
</html>
var caja_actual = $(this);
var velocidad = Math.random() * 2000 ;
caja_actual.animate(
{
marginTop: 150 + ( Math.random() * 400 )
},
velocidad
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment