Blog2007 ≫ Mulled wine! And BEER!

Barbecue tomorrow with added booze, to wash away the pain of this javascript...

This one's mostly for Dean, I know he likes to hear about how hard we're working at work. We're having another one of our fun days tomorrow, one last barbecue to celebrate a big deal working out, and everyone working hard to make it happen. Also, you would have to say that it's pretty much the end of the summer now. It's dark outside now but I'm sure it was quite a nice day, but hey just the fact that it's DARK at this time tells you that not even global warming can stop us slipping into winter. We were already told that there would be mulled wine tomorrow at the barbie, and an excess of puddings, but even better I just saw someone wheeling a barrel of beer through the office. Happy halloween everyone.

This one's not so much for Dean, it is an annoying programming thing that I've just sort of worked out. Been having an issue today where a really simple javascript thing was failing, on Safari only. I just wanted to trigger an onclick event on a link, make as if someone had clicked a link if something happened. I'm using jQuery1 so I ought to be able to do just


and that works fine, but not in Safari (the shit Mac browser that people use by default at work)... This is how I'm getting around it, but I shouldn't have to do this, should I?

if ( $.browser.safari ) { eval( $( this ).attr( 'onclick' )) } else { $( this ).click() }

javascript: Programming language of the internets, mostly how I make my living.

⬅️ :: ➡️

Paul Clarke's weblog - I live in A small town. Wed to Clare + dad to 2, I'm a full stack web developr, + I do js / nodejs, some ruby, other languages etc. I like pubbing, parkrun, restaurants, home automation and other diy jiggery-pokery, history, tree stuff, TV, squirrels, pirates, lego, and time travel.