Vista Internet Death

June 30th, 2009

Over the past week or so, I had been experiencing a very poor internet connection on my main machine. Having just renewed my ISP contract with *ahem* AOL (it was cheap!), I was all ready to go postal on their useless support staff.

However, after a quick check with some my laptop and newly acquired g1, I found the internet and wireless was working fine. Yesterday, any Internet connected applications were just failing completely, giving me the ‘xxx has stopped working’ dialog box. A quick search on the g1 came up with the following fix:

  1. Open up command prompt (start menu > search ‘cmd’)
  2. type in ‘netsh winsock reset’

Restart the machine, and everything was back to normal!

quick jquery tooltips

May 7th, 2009

Thanks to the all-encompassing power of Twitter, I was sent a nice little jquery wizard called Glimmer that generates jquery snippets for you (cheers, Jamie!).

Needing a quick tooltip solution, I gave Glimmer’s a whirl, and all was dandy. However, I ran into a small problem where I was creating the tooltip-generating element on the fly with AJAX. When new elements were being created, the tooltip was retaining a previous tooltip’s content.

As the tooltip is displayed by appending the tooltip element (in this case a <p> tag) on mouse over, and hidden by removing the <p> tag on mouse out, there seemed to be instances where the removal of the tooltip element wasn’t being triggered, and so several tooltip elements were being generated, all with the same id ‘tooltip’.

Here, for your coding pleasure, is my quick fix:


$(document).ready(function() {
  // initially create the tooltip element (in this case, a simple p tag), and hide it
  $('body').append('<p id="tooltip">');
  $('#tooltip').hide();


  function mouseoverActiontooltip(event) {
    // set the tooltip to contain the triggering element's 'alt' attribute (Glimmer used the 'rel' attribute, but you can use what you like), and show it
    $('#tooltip').html($(this).attr('alt')).show();
    $('#tooltip').css("left",(event.pageX + 20) + "px");
    $('#tooltip').css("top",(event.pageY - 10) + "px");
  }


  function mouseoutActiontooltip(event) {
    // on roll out, hide the tooltip, as opposed to completely removing it
    $('#tooltip').hide();
  }


  function mousemoveActiontooltip(event) {
    $('#tooltip').css("left",(event.pageX + 20) + "px");
    $('#tooltip').css("top",(event.pageY - 10) + "px");
  }

  // bind the above functions to the triggering element, in this case all img tags
  $('img').bind('mouseover', mouseoverActiontooltip);
  $('img').bind('mouseout', mouseoutActiontooltip);
  $('img').bind('mousemove', mousemoveActiontooltip);
});

Hope this works for you!

Wait, its not finished…

April 17th, 2009

It occurred to me that people might actually be looking at this site… Rest assured, I will be designing a new layout very soon! Whilst you wait, check this visual synthesizer flash magic: http://lab.andre-michelle.com/tonematrix

Hello world!

April 15th, 2009

Ooh, my first post of my sexy new Wordpress Blog! Yet another iteration of my personal site, it will be host to all manner of gubbins from code snippets, my latest web portfolio offerings and links to stuff I find interesting. Hopefully, these ramblings will be all the more frequent and interesting due to my recent foray into the world of freelancing. I’ve got some cool projects in the pipeline, so hope you’ll be back for more!

For now, have some monkey situps!