Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Get well soon from Alastair

</surgery>
  • Loading branch information...
commit be859c0825dd922d3bf815c36ce21c3dc0e3b328 1 parent a9326e4
alastairmorse alastairmorse authored

Showing 1 changed file with 62 additions and 0 deletions. Show diff stats Hide diff stats

  1. +62 0 getWellSoonFromAlastair.html
62 getWellSoonFromAlastair.html
... ... @@ -0,0 +1,62 @@
  1 +<html>
  2 +<style>
  3 +* {
  4 + text-align: center;
  5 + font-family: cursive;
  6 +}
  7 +h1 {
  8 + font-size: xx-large;
  9 + text-decoration: underline;
  10 +}
  11 +div {
  12 + width: 400px;
  13 + margin-left: auto;
  14 + margin-right: auto;
  15 + border: 10px;
  16 + border-style: dashed;
  17 + border-color: rgba(211,155,155,0.88);
  18 + padding: 10px;
  19 +}
  20 +img {
  21 + width: 50%;
  22 + height: 50%;
  23 +}
  24 +</style>
  25 +<body>
  26 +<h1>Get well soon!</h1>
  27 +- Alastair
  28 +<div id='kittens'>Lawding teh kittehs!11!!!!1...</div>
  29 +<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
  30 +<script>
  31 + function blink(selector){
  32 + $(selector).fadeOut('fast', function(){
  33 + $(this).css('color', 'red');
  34 + $(this).fadeIn('fast', function(){
  35 + blink(this);
  36 + $(this).css('color', 'blue');
  37 + });
  38 + $(this).css('color', 'yellow');
  39 + });
  40 + }
  41 + blink('body > h1');
  42 +
  43 + $(document).ready(function() {
  44 + // Teh ugly code for teh kittens
  45 + $.ajax({
  46 + url: 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent('http://cuteoverload.com/feed/'),
  47 + dataType: 'json',
  48 + success: function(data) {
  49 + $('#kittens').empty();
  50 + $.each(data.responseData.feed.entries, function (e){
  51 + var regex = new RegExp(/http:\/\/.+?\.jpg|jpeg/gi);
  52 + var t = data.responseData.feed.entries[e].content;
  53 + if (t.match(regex)){
  54 + $('#kittens').append($('<img>').attr('src', t.match(regex)[0]));
  55 + }
  56 + });
  57 + }
  58 + });
  59 + });
  60 +</script>
  61 +</body>
  62 +</html>

0 comments on commit be859c0

Please sign in to comment.
Something went wrong with that request. Please try again.