Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biojazzard/aeb6fa553a90adf10585 to your computer and use it in GitHub Desktop.
Save biojazzard/aeb6fa553a90adf10585 to your computer and use it in GitHub Desktop.
Simple jQuery Bootstrap CoffeeScript Boilerplate.
<h2 class="text-center">El boton naranja se volverá verde a los 2 segundos.</h2>
<div id="rober" class="btn btn-warning btn-block">
ROBER
</div>
<p class="text-center">Actualizar para repetir el efecto.</p>
###
# alfredo@1un.es | 02.2015
###
(($) ->
# Variables
config =
welcome: '############# 1un.es #############'
# Functions
# Di Hola!
init = ()->
# Log in console that we´re ready to rock!.
console.log config.welcome
# Quitar la clase btn-success y poner
visual = ()->
$('#rober').toggleClass 'btn-warning'
$('#rober').toggleClass 'btn-success'
# Do it!.
init()
# A los 2 seg=== 2000ms lanza visual()
setTimeout ->
visual()
, 2000
) jQuery
.roberized {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment