At the Arcade

Saturday, February 28, 2009

On thursday night I went out to the local bowling alley with some friends, which we then realized was poor choice because it was league night! We had to wait around for about an hour before we could bowl, and the majority of our waiting was done in the arcade - luckily I had decided to bring my camera for the evening.  I didn’t take many shots, but here’s my two favorite from the arcade.

Game Over

Jackpot

Posted by Chris Barr on 02/28 at 04:58 PM
Filed under Photography0 Comments

Stroke of Insight

Saturday, February 21, 2009

Watch on Ted.com: http://www.ted.com/talks/view/id/229

Posted by Chris Barr on 02/21 at 02:53 PM
Filed under General0 Comments

Radiohead Box Set = Awesome

Thursday, February 19, 2009

Radiohead Box Set II

Recently I discovered woot.com, they sell one product a day and only have a limited supply - so demand is usually high and the sell out fast! I was up late one night last week and saw they had a seven-album Radiohead box set for only $45! With Radiohead being my all time favorite band, I had to spring for this. For those less fortunate, you can still pick up the Radiohead Box Set on Amazon.

The box set itself is just plain gorgeous, not to mention the art on each of the seven albums and their respective booklets. I took some photos, click though for a larger version.

Radiohead Box Set I Radiohead Box Set III Radiohead Box Set IV
Posted by Chris Barr on 02/19 at 09:44 PM
Filed under General, Photography, Design, Music, Web0 Comments

Disable Text Selection With jQuery

Saturday, February 07, 2009

I was recently working on an interface where there would be a log of dragging, scrolling and clicking - an unfortunate side effect of these type of things is that the user may sometimes unintentionally select text. Which this doesn't break anything, it just looks bad can ruin the smooth experience you are trying to present the user with. It turns out that every browser has either some kind of hidden CSS or javascript function to prevent text selection.

I searched around and eventually came across this page on James Dempster's site. He wrote a simple jQuery plugin to turn off text selection only for the elements you specify. His plugin works just fine, but I believe it can be simplified. Below is my version.

$(function(){
	$.extend($.fn.disableTextSelect = function() {
		return this.each(function(){
			if($.browser.mozilla){//Firefox
				$(this).css('MozUserSelect','none');
			}else if($.browser.msie){//IE
				$(this).bind('selectstart',function(){return false;});
			}else{//Opera, etc.
				$(this).mousedown(function(){return false;});
			}
		});
	});
	$('.noSelect').disableTextSelect();//No text selection on elements with a class of 'noSelect'
});

After you include jQuery on your page, just include this script and any element with a class of noSelect will not be able to have it's text highlighted — easy! (Obviously you can change the class name to be whatever you want though.)

Do take note that the plugin is contained within the $(document).ready(function(){/*your code here*/}); (which can also be written as $(function(){/*your code here*/}).) That just sets it up as a method to be called. To call the method and disable text selection you just get a standard jQuery element and add the method onto it : $('.noSelect').disableTextSelect();

Posted by Chris Barr on 02/07 at 07:30 PM
Filed under Web, Code, Javascript32 Comments

Foxmarks

Tuesday, February 03, 2009

Just wanted to give a quick plug to of of my new favorite products, Foxmarks.  Foxmarks is a great little online service and browser plugin to synchronize your bookmarks between computers.  I rely on this between my computer at home and my work computer.  If I see something at work that I want to look at later, I simply bookmark it and forgot about it.  When I get home, I have it already in my bookmarks bar.  They also have a pretty nifty web interface so you can access you bookmarks from anywhere without installing software.

So if you want to try it out, download the Firefox Plugin, create an account and start backing up and syncing your bookmarks.  If you’re not a Firefox user (and you’re not afraid of alpha or beta release software) there’s a version for IE and a version for Safari as well.  The Safari syncing really comes in handy for iPhone users since your iPhone bookmarks are synced from Safari.

I’ve just now installed the Safari plugin and everything seems to be working great so far.  Let me know what you think, leave a comment!

Posted by Chris Barr on 02/03 at 11:39 PM
Filed under Web, Macintosh, Productivity, Tech0 Comments