Skip to content

Instantly share code, notes, and snippets.

@milligramme
Created June 8, 2011 09:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save milligramme/1014120 to your computer and use it in GitHub Desktop.
toggle♡ $ haml -f html5 hearts.haml hearts.html
!!!
%html
%head
%meta{:charset => "utf-8"}/
%script{:src => "https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"}
:css
td {
-webkit-transition: 3s ease-in-out;
-webkit-transform-origin: 25% 25%;
font-size: 150%;
}
:javascript
$(function(){
$('td').mouseover(function(){
$(this).css('-webkit-transform', 'rotate(1080deg)');
if ($(this).text() === "") {
$(this).text("");
$(this).css('color','#0f0');
}
else {
$(this).text("");
$(this).css('color','#f00');
};
});
});
%title heart full test
%body
%table
%tbody
- 20.times do
%tr
- 30.times do
%td
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment