Tutorials TumbleLog Our Thoughts
Bandit Design » Our Portfolio Our Design Contact Us
Quite often at Bandit Design while we're working on your project, we'll stumble upon interesting or humourous things -- so we thought why not share them with the world!
RSS iPhone Random Archive

Bandit Design

This is a TumbleLog authored at the desks of Bandit Design. We're a small web and graphic design studio based in Wellington, New Zealand.

Visit Bandit Design »

18 August 2010
14 August 2010

jQuery Wrap Not Working?

Are you trying to use .wrap() in jQuery only to find it isn’t working?

Something the docs don’t tell you is that you can only wrap elements that are attached to the DOM! Important.

Take for example:

$("<a href='#'>My Link</a>").wrap("<li></li>").appendTo("ul:first").click(function() { ... } ); // will not work
$("<a href='#'>My Link</a>").appendTo("ul:first").wrap("<li></li>").click(function() { ... } ); // will work fine!
13 August 2010
12 August 2010
06 August 2010
01 August 2010

Make Google Chrome Smarter

Want to make Google Chrome take you directly to stuff without having to search first?

  1. Click the wrench.
  2. Click options.
  3. Click “Manage” under Default Search on the Basics tab.
  4. Click “Add…” to add a new search engine.
  5. Type in the following:

    Google Go
    >
    http://www.google.co.nz/search?q=%s&btnI=Im+Feeling+Lucky
  6. Click OK, then click “Make Default”.

Now when you type in something like “imdb watchmen”, or “wiki new zealand”, or “php str_replace” Chrome will take you directly to the first result rather than searching first.

More useful search engines can be found here.

31 July 2010
30 July 2010
29 July 2010