This is a random list of jQuery code that roughly reflects real life.

Follow me on twitter @reallifejquery Follow reallifejquery on Twitter


Tuesday, June 8, 2010

Parenthood

$('#MotherToBe .twins').unload( function() {
   // 0 - 5
   $(this).attr("voice-family", "male");
   $(this).attr("volume", "x-loud");
   $(this).attr("pitch", "x-high");
   $(this).resize();
   $('.randomobjects').draggable();
   $(this).resize();

   // 6 - 10
   $(this).attr("volume", "loud");
   $(this).attr("pitch", "high");
   $(this).resize();
   $(this).filter(".knowledge").effect("explode");
   $(this).resize();

   // 11 - 15
   $(this).attr("pitch", "medium");
   $(this).resize();
   $(this).filter(".reason").effect("blind");
   $(this).siblings.text();
   $(this).add(".friends").text();
   $(this).resize();

   // 16 - 21
   $(this).attr("pitch", "low");
   $(this).resize();
   $(this).add(".friends").text();
   $(this).appendTo(".College");
   $(this).detach();
}

Sunday, June 6, 2010

Surgical procedure - removing your tonsils

$('body').add('anesthetic');
$('#conciousness').fadeOut();
$('#tonsils').remove();
$('#conciousness').fadeIn();
$('#diet').replaceWith('Ice Cream');

Saturday, June 5, 2010

Organising a night out

$('.venue:has(space)').find().get('Reservation');
$('.friends .underage').each().parents().get('Permission');
$('.friends:selected').text("Let's go out for dinner tonight!");

Friday, June 4, 2010

Cleaning the house

$('.surfaces').remove('.dust');
$('.bins:not:empty').empty();
$('.dishes').effect('shake');
$('#dishwasher .rack').load('dishes').add('washing powder');
$('#dishwasher #onbutton').keypress();
$('.television').focus();

The start of an American Football play

$('#play').select();
$('#players .good').select();
$('#players:selected').position();
$('.snap').trigger();

Wednesday, June 2, 2010

A friend in need ...

$('.friends').closest().find().unload('.troubles');

Tuesday, June 1, 2010

Recovering from a hangover

$('#bowels').empty();
$('.bucket').closest().get(1).append('vomit');
if ($('#bed').has('.someoneelse')) {
   $('#selfrespect').die();
   $('#bed').empty();
}
$('.regrets').each().focus();
$(self).detach('.headache');
$(self).append('.food .greasy');

Monday, May 31, 2010

Missed a blog post?

var requiredsleep = 1000 * 60 * 60 * 12;
$('#yesterday').blur();
$('.body').error(function() {
   $('#consciousness').fadeOut().delay(requiredsleep).fadeIn();
   $('#yesterday .blogentry').add();
   $('#today .blogentry').add();
});

Police work

$('.crime').stop();
if ($('#criminal .crimes').prev().prev()) {
   // Third strike
   $('#criminal').appendTo('#jail');
}
else {
   // Let them go with a warning
   $('#criminal .mindset').toggle();
}

Saturday, May 29, 2010

Packing your suitcase

$('#clothes').each().effect('fold');
$('#shoes').each().add('socks'); // so the shoes keep their shape
$('#suitcase').add(document.getElementById('clothes'));
$('#suitcase').add(document.getElementById('toiletries'));
$('#suitcase').add(document.getElementById('shoes'));
$('#suitcase .zip').scroll();

Friday, May 28, 2010

A visit to the chiropractor

$('body #back .pain').show();
$('body #back').click().click().click().dblclick();
$('body #back .pain').hide();

Thursday, May 27, 2010

Chicken Burrito with jQuery

$('#chicken').slice(8);
$('#chicken').add('marinade').delay(2000);
$('#chicken').add('.salsa').add('.guacamole').add('.jalapenos');
$('.ingredients').wrap('tortilla');

Wednesday, May 26, 2010

Regardless of the day ahead, coffee is needed.

if ($(self).has('.work')) $(self).find('.coffee').first();
else if ($(self).has('.chores')) $(self).find('.coffee').first();
else $('.friends').join('#cafe');

Tuesday, May 25, 2010

Dealing with an oil spill is easy with jQuery

$('#well').append('sealingdome');
$('.water').remove('.oil');

Monday, May 24, 2010

Man vs. Nature

// Realistic
$('#volcano').show('explode');
$('.flights').delay(800).delay(800).delay(800).remove();

// Optimistic
$('.flights').replaceWith('trains, busses, boats');
$('.complaints').trigger('change');

Sunday, May 23, 2010

Hide and go seek with jQuery

$('#seeker').delay(100);
$('.friends').hide();
$('.friends').each(function() {
   $('#seeker').find(this).show();
})

Saturday, May 22, 2010

Robbing a bank

$(self).load('gun');
$('#bank').find();
$('.money').remove();
$('.cops').effect('shake');

Friday, May 21, 2010

jQuery approach to sex

$('#mypartner').focus(function() {
   $('#mypartner').andSelf().remove('.clothes');
   $('#me').find('#mypartner .clitoris').wrap('tongue');
   $('#me .penis').animate({
      height: '+=100%,
      width: '+=100%'
   });
   $('#mypartner').nextUntil('.orgasm').slideUp().slideDown();
   $('#me .penis').unload(function() {
         $('#me .penis').remove();
         $('#mypartner').andSelf().fadeOut();
      });
   });
});

Thursday, May 20, 2010

jQuery sayings

$('.ladies').first();
$('#age').before('#beauty');
$('#godliness').next('#cleanliness');
alert($('.blessings').size());
$(self).delay(999999).add('.goodthings');
$(':not(visible)').each(function() {
 $('#mind').remove($(this));
});
if ($('.wheel .squeaky')) $('#grease').get();

// And a couple of cheaty ones that I couldn't resist...
$(self).live('sword', function () { die('sword'); });
$(self).animate({
 haste: +100,
 speed: -100
});

Wednesday, May 19, 2010

jQuery Haiku

$(self).animate({
   opacity: .01});
$(self).has('#disguise');

Tuesday, May 18, 2010

How mice affect our lives

$('#MyHouse').mouseenter(function () {
   $('.cheese').slice(2);
   $('.mousetrap').add('.cheese');
   $('.mousetrap').position();
   $('.mousetrap #armed').toggle();
   $('.mousetrap').click(function() {
      if ($('.mousetrap').has('.mouse')) {
         $(this).remove('.mouse');
      }
      else if (!$('.mousetrap').has('.cheese')) {
         $('.cheese').slice(2);
         $('.mousetrap').add('.cheese');
      }
      $('.mousetrap #armed').toggle();
   });
});


$('#MyHouse').mouseleave(function () {
   $('.mousetrap').remove();
});

Monday, May 17, 2010

Hacking For Dummies

$('.employeeemails').append($('#trojan')).ready(function() {
   $(self).add('#rootaccess');
   $('#data .sensitive').clone().appendTo('#myserver');
   $('.logs .tracesofme').removeData();
});

Sunday, May 16, 2010

A day in the life of a hummingbird

$('.flower:contains("Sugar")').hover(
   function() {
      $(this).empty();
   }),
   function() {
      $('.flower').next().focus();
   });
});

Saturday, May 15, 2010

Our relationship was never like this before...

$('#feelings #partner').change(function() {
   if ($('#feelings #partner').val()>$('#feelings #partner').before().val())
   {
      $('#love').show();
   }
   else if ($('.someoneelse').has('interest'))
   {
      $('#partner').replaceWith('.someoneelse');
   }
   else
   {
      $('#facebook_relationship_status').toggle();
   }
});

Friday, May 14, 2010

Inside the mind of a serial killer

$('#reality').detach();

while (1)
{
   $('#victim').select(function() {
      if (!$('.witness').attr('visible')) {
         $('#victim').slice(16);
         $('#victim').die();
         $('#victim .bodyparts :visible').hide();
      }
   });
}

Thursday, May 13, 2010

I just met someone and there was chemistry!

$('.stranger').click(function() {
   {
      if ($(self).hasClass()) date();
      else $('#boundaries').blur();
   }
});

What sort of person are you?

// Eliteist
if ($(self).getClass() != $('.otherpeople').getClass()) {

   return false;
}
else return true;

// Snob
if ($(self).getClass() > $('.otherpeople').getClass()) {

   return false;
}
else return true;


// Groupie
if ($('.otherpeople').getClass() > $(self).getClass()) {
   return true;
}
else return false;

// Humanitarian
return true;