Photo dump

This is just what I had sitting around on my desktop. Thought it was an interesting comment on the random crap I collect.






 

What to do with jQuery when you’re bored…

I guess I was a bit bored tonight.
Q: What happens if I press the red button?
A: You get eaten.

Drew the dinosaur because I couldn’t find anything that would “creep” in from the side of the page like I wanted. (press the red button to see what I’m talking about…)

Anyway, now for the boring stuff (or the awesome stuff, depending on who you are):
I know it’s not the best way to code something, but sometimes I like having all the code in one place. ie. It’s best to keep your markup away from you JS, but with jQuery it’s so easy to create elements on the fly, and dump them wherever you need. I would usually keep my CSS in another file, but for this case, keeping it together allows you to think of the dinosaur (and his message) as a module. For example, pop open firebug on any website that uses jQuery (I’m sure you can find a few) and paste the code below into the console. You will have to assign the click event to an element on the page (use the firebug inspector to find one) and it should work. Boom completely modular.

RED BUTTON

Here’s the code that does it:

$('#naughty_button').click(function(){

  var img = "http://ronaldvwilliams.com/common/images/dino_angry.png";
  var txt = "YOU'RE ABOUT TO GET EEEAAATEN!!! AAAAAAH!";
  var t;
  var styles1 = {'position':'absolute', 'top':'100px', 'right':'-700px', 'width':'1000px', 'height':'500px'};
  var styles2 = {'float':'right'};
  var styles3 = {'float':'left', 'width':'500px', 'height':'100%' , 'font-size':'100px', 'font-family' : 'helvetica', 'text-wrap':'unrestricted', 'font-weight':'bolder'};
  $('body').append(
    $('<div>').attr('id' , 'dino_angry').css(styles1).append(
      $('<img>').attr('src',img).css(styles2)
    ).append(
      $('<div>').attr('id', 'dino_angry_text').text(txt).css(styles3)
    )
  );
  $('#dino_angry').animate({'right':'0px'}, function(){
    t = setInterval(function(){
      var rgb = 'rgb(' + random() + ',' + random() + ',' + random() + ')';
      $('#dino_angry_text').css('color',rgb)
    }, 200)
  });
  function random() {var x = Math.floor(Math.random() * 255); return x}; 

}); 
 

See My Vest

I just can’t stop singing this song lately, and I don’t know why.

BTW, hurricane Irene is currently visiting NYC. I’m stuck in side for a couple days hoping our windows don’t get smashed by tree branches. Right now I’m debating wether to use Ruby or Python to code a project I’m starting. I haven’t coded in either yet… this decision is hard!

 

Blu

This guy.

Ok, so I wanted to tell you a little about this guy, but this is all I could find: “Blu is the pseudonym of an Italian artist who has deliberately decided to conceal his real identity. What little is known about him is that he lives in Bologna and has been active in the street art scene since 1999.” (from Wikipedia, Link.).

Anyway, he does huge wall art, he’s from Italy, and started out as a graffiti artist. The giant outdoor installations are cool, but I like his inks a lot.

Huge wall art:

Sketch Book:

Grotesque, inspired, visionary, intense. Check out his website Here

 

Update On Fluid Layout

A co-worker challenged me to expand the layout from my last blog post so that all 3 columns were the same height (thanks Timmy). Check out the modified layout here:

View The Demo

Download a Sample