The beginning of the end for police cruisers?

alexplus100003.jpg

You may be seeing more of these in the future. The T3 vehicle first started making headlines in 2006, when gas prices were approaching $100 per barrel; now that a barrel will run you $125, U.S. police departments are turning to the device in earnest, and depending on who you talk to, it beats foot patrols.

Seventeen large will get you two T3's, and the electric-powered trikes have an estimated operating cost of ten cents a day.

(Note: the above photos are from Flickr user alexplus100--s/he has better photos of the thing than the T3 website does!)

And now, since they're on the way out, let's take a look at some police cruisers over the years, from different countries. Hit the jump for tons of larger shots.

policecruise007.jpg


...

Strange Architecture

Normally we're hating on those YouTube video slideshows set to music but this one's an exception with some truly odd and inspirational buildings.

via frame

...

TechnoPhobia Ltd.: Senior Web/UX designer

Full-time

(Sheffield, United Kingdom) Our Design team are responsible for the user's experience of the web apps and sites we produce. You'll need to be much more than a Photoshop and Dreamweaver monkey, with skills from prototyping through designing to building usable, accessible interfaces on large, complex projects.

You'll need to be able to produce:

* Gorgeous, highly usable web app and website interfaces
* Semantic, Accessible, Standards compliant xhtml/css to the highest
standards
* Wireframes and interactive prototypes, site maps and workflows

And you'll need to know how to:

* Get inside a user's head and produce to their needs
* Architect huge projects;public and private sectors
* Translate brand into a successful online experience.

And much more, but we're out of words.

Job Perks: We've got a range of benefits on offer, including beer o' clock on Fridays, free massages and fruit, along with the boring stuff like healthcare and pensions.

Apply: Go to www.technophobia.com/careers/ or email your CV to personnel@technophobia.com - strictly no agencies please.

A Recent History of Writing and Drawing

Writing and Drawing 19.jpg

A Recent History of Writing and Drawing, on display at the Institute of Contemporary Arts until August 31, 2008, is an exhibition that explores the evolving relationship between technologies of communication and their users. It is a project by the programmer / designer Jurg Lehni and the graphic designer Alex Rich, curated by design historian Emily King, and involves a variety of interactive and non-interactive devices for writing and drawing.

more after the jump.

...

Lucid Dreams from Contact Lens Jewelry

eric-klarenbeek-at-selfridges-oxford_street_lo.jpg

The Wonder Room at Selfridges department store in London is hosting an exhibition of new work by Dutch designer Eric Klarenbeek. The exhibition will feature new and recent work including the Floating Light Project and the results of his recent experiments with contact lens jewellery. The Lucid Dream (shown here) is an illuminating hand-blown glass bubble which features an LED with an intended lifespan of 50,000 hours. Watch a video of the Lucid Dream project here. The exhibition will continue until October.

Via DeZeen

...

2 (or 3) Questions for Cressida Payavis

One of the most interesting ideas to come out of the many satellite exhibitions during New York’s design week this year was Adieu, Journal of Arts and Events, a concept developed by Cressida Payavis, a member of the Bond design collective. The magazine’s contents focus on fashion, design, technology and global affairs, with the emphasis on a sustainable existence, but what makes Adieu stand out is that it is printed on recyclable paper with a dissipating ink. By the time the news becomes stale, the ink has faded away, leaving a blank journal in its stead. With any luck, Adieu will have inspired the user to create. The object of beauty becomes a tool in more ways than one.


The idea behind Adieu is brilliant! Is this still a concept or will we be seeing this Journal of Arts and Events sometime soon?
Currently it is a concept. With the proper interest and monetary backing, it can be a reality. Its content also is very important to me. I want it to contain bits and pieces of everything relevant to promoting a sustainable existence. Paris Hilton fans need not subscribe.

Tiffany & Co. is looking for an Interactive Art Director in New York

coroflot_design_jobs.jpg

Art Director - Interactive Media
Tiffany & Co.

New York, New York

Projects include Tiffany & Co. web sites, intranet and miscellaneous interactive assignments. Major responsibilities will include : The planning of scalable design concepts maintaining Tiffany & Co. luxury brand identity and character, as well as hands-on, precision-oriented User Interface design...

» view

The best design jobs and portfolios hang out at Coroflot.

...

Idee Labs: Multicolor Image Search

Idee Labs has created a useful set of online image search tools, including a multicolor search that allows you to filter images using a palette of up to ten colors. Using a spectrum color selector, you can pick the colors you are looking for and it will return only photos that contain those colors. Multicolr Search Lab With the Multicolr Search Lab you are able to search up to ten different colors from a palette of 120 different shades. The search will filter through three million 'interesting' flickr photos or three million Alamy stock photos.

Photoshop vs Fireworks

It's a fight between Photoshop and Fireworks. Who will win?

new iPhone nytimes GUI

An article covering the NYTimes GUI design for the iPhone

Dave climbs kilimanjaro

Dave (one of our developers at Headscape) climbs Kilimanjaro just to show off his Headscape t-shirt. That is what I call committment. Congratulations Dave.

The Process

What if there were no stop signs... and a major corporation was charged with inventing one?

The cloud must be decentralized at Aral Balkan

With Amazon's S3 paving the way for commodity computing, are we in danger of placing all our eggs in one basket with centralised platforms?

Not Yet Squirrelly

NCsoft Corporation: Web Designer

Full-time

(Austin, TX) This person will be responsible for creating engaging user experiences and accomplish business or marketing goals. Experience with interface design, information architecture, and web application design is preferred. A passion for user-centered interactive design and the ability to clearly communicate creative solutions to developers and stakeholders is most desirable.

A casual work environment, comprehensive benefits and competitive salary are all part of the package. To read the complete job summary, apply for this position or to see other NCsoft opportunities, visit our jobs website at: http://www.plaync.com/us/jobs/ EOE

Apply: Visit our jobs website at: http://www.plaync.com/us/jobs/

NCsoft Corporation: Web Designer

Logo

Location: Austin, TX
URL: http://www.plaync.com/us/jobs/

NCsoft North America, the U.S. branch of NCsoft, the world’s largest independent developer and publisher of online computer games, is seeking a talented and experienced Web Designer to create high- volume, customer-facing web sites and applications.

This person will be responsible for creating engaging user experiences and accomplish business or marketing goals. Experience with interface design, information architecture, and web application design is preferred. A passion for user-centered interactive design and the ability to clearly communicate creative solutions to developers and stakeholders is most desirable.

Responsibilities

• Design and develop interactive, consumer-focused web sites and web applications.

• Produce innovative, engaging and effective designs that meet technical requirements, user needs and consumer goals.

• Lead the design process using wireframes and create rapid prototypes and mock-ups to validate design concepts.

• Ensure the quality and effectiveness of designs via design reviews, user testing and collaboration with the development team.

• Perform ongoing web site and web application maintenance and feature development.

Qualifications

• 4+ years of professional web design experience.

• Excellent visual design sensibilities and proven ability to design a polished, engaging look and feel for web sites and applications.

• Mastery of HTML, CSS, XML, DHTML and Javascript with knowledge of cross browser compatibility.

• Skilled at building table-free layouts using semantic markup and CSS.

• Strong proponent of web standards and usability.

• Expertise with Flash and ActionScript.

• Thorough understanding of standard design applications (Photoshop, Illustrator, Dreamweaver, Flash).

• Ability to translate business requirements and user goals into effective design solutions.

• Proven ability to identify conflicting design requirements and constructively solve problems for the end-user’s best interests.

• Portfolio showcasing professional web site and application design expertise.

• Bachelor’s degree or equivalent experience.

• Experience working on large-scale web sites a plus

• Experience with content management systems (particularly Movable Type) a plus.

• Familiarity with video games and the gaming industry and trends a plus.

A casual work environment, comprehensive benefits and competitive salary are all part of the package. To apply for this position or to see other NCsoft opportunities, visit our jobs website at: http://www.plaync.com/us/jobs/ EOE

About NCsoft Corporation NCsoft North America is headquartered in Austin, Texas and is a wholly-owned subsidiary of Korea-based NCsoft Corporation. NCsoft, with its own development and publishing offices in Texas and California, also works with other NCsoft subsidiaries and third party developers throughout North America to develop and publish innovative online entertainment software products. The company has successfully launched multiple online titles in the last three years and continues to support its franchises, which include Lineage®/Lineage II, City of Heroes/City of Villains, Guild Wars®/Guild Wars Factions®/Guild Wars Nightfall®/Guild Wars: Eye of the North™, Richard Garriott’s Tabula Rasa®, Dungeon Runners™, and Exteel™ More information about NCsoft can be found at http://www.plaync.com.

To apply: http://www.plaync.com/us/jobs/

10 Tips for Being a Greener Web Designer

In the immortal words of Kermit, its not easy being greenbut there /#i#/are/#ei#/ ways you can do your bit for the environment. Here, Matt offers ten commonsense ways to reduce your carbon footprint ... and your energy bill.

Creating a Dynamic Poll with jQuery and PHP

When you combine some neat functionality courtesy of PHP with the cleverness of jQuery you can produce some pretty cool results. In this tutorial we’ll create a poll using PHP and XHTML, then make use of some jQuery Ajax effects to eliminate the need for a page refresh, and to give it a nice little bit of animation.

  1. HTML
  2. PHP
    1. Introduction
    2. poll_default()
    3. poll_submit()
    4. poll_return_results()
    5. poll_ajax()
  3. CSS
  4. Javascript
    1. Introduction
    2. formProcess()
    3. loadResults()
    4. animateResults()

HTML

Let’s get our <head> set up:

<link href="style.css" rel="stylesheet" type="text/css" />
<script src="jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
<script src="poll.js" type="text/javascript" charset="utf-8"></script>
  • style.css will hold the CSS markup.
  • jquery.js is the base jQuery library.
  • jquery.cookie.js is a plugin by Klaus Hartl to add cookie manipulation to jQuery.
  • poll.js will have the Javascript that makes the poll dynamic.

Next, we’ll create a simple poll form:

Poll
<div id="poll-container">
    <h3>Poll</h3>
    <form id='poll' action="poll.php" method="post" accept-charset="utf-8">
        <p>Pick your favorite Javascript framework:</p>
        <p><input type="radio" name="poll" value="opt1" id="opt1" /><label for='opt1'>&nbsp;jQuery</label><br />
        <input type="radio" name="poll" value="opt2" id="opt2" /><label for='opt2'>&nbsp;Ext JS</label><br />
        <input type="radio" name="poll" value="opt3" id="opt3" /><label for='opt3'>&nbsp;Dojo</label><br />
        <input type="radio" name="poll" value="opt4" id="opt4" /><label for='opt4'>&nbsp;Prototype</label><br />
        <input type="radio" name="poll" value="opt5" id="opt5" /><label for='opt5'>&nbsp;YUI</label><br />
        <input type="radio" name="poll" value="opt6" id="opt6" /><label for='opt6'>&nbsp;mootools</label><br /><br />
        <input type="submit" value="Vote &rarr;" /></p>
    </form>
</div>

This form will be processed by the PHP for now, and when we get the Javascript running, by jQuery. The PHP and Javascript are designed to pull the option ID from the value tag. &nbsp; is just a HTML entity encoded space, and &rarr; is an arrow: →.

PHP

Introduction

If Javascript is disabled, the PHP will:

  1. Take GET/POST requests from the form
  2. Set/check a cookie
  3. Make sure the request is from a unique IP
  4. Store the vote in a flat file DB
  5. Return the results included with a HTML file

If Javascript is enabled, the PHP will:

  1. Take GET/POST requests from the Javascript
  2. Make sure the request is from a unique IP
  3. Store the vote in a flat file DB
  4. Return the results as JSON

For the flat file DB we will be using a package written by Luke Plant.

First, we need an array with the names and IDs of the poll options:

<?php
$options[1] = 'jQuery';
$options[2] = 'Ext JS';
$options[3] = 'Dojo';
$options[4] = 'Prototype';
$options[5] = 'YUI';
$options[6] = 'mootools';

The flatfile package uses numbers for the column identifiers, so lets set some constants to convert those to names:

define('OPT_ID', 0);
define('OPT_TITLE', 1);
define('OPT_VOTES', 2);

When the form is submitted, PHP needs to know what file to insert the results into and return, so we set another constant:

define('HTML_FILE', 'index.html');

We need to include flatfile.php and initialize a database object:

require_once('flatfile.php');
$db = new Flatfile();

The flat files are just text files stored in the data directory:

$db->datadir = 'data/';
define('VOTE_DB', 'votes.txt');
define('IP_DB', 'ips.txt');

If we get a request with the poll parameter, it’s the static form, so we process it. If the request has a vote parameter in it, it’s a Ajax request. Otherwise, we just return the HTML_FILE.

if ($_GET['poll'] || $_POST['poll']) {
  poll_submit();
}
else if ($_GET['vote'] || $_POST['vote']) {
  poll_ajax();
}
else {
  poll_default();
}

poll_default()

function poll_default() {
  global $db;

  $ip_result = $db->selectUnique(IP_DB, 0, $_SERVER['REMOTE_ADDR']);

  if (!isset($_COOKIE['vote_id']) && empty($ip_result)) {
    print file_get_contents(HTML_FILE);
  }
  else {
    poll_return_results($_COOKIE['vote_id']);
  }
}

poll_default() processes requests directly to the script with no valid GET/POST requests.

The global line makes the $db object available in the function’s scope.

The script tracks unique IPs to make sure you can only vote once, so we do a query to check whether it is in the DB:

$ip_result = $db->selectUnique(IP_DB, 0, $_SERVER['REMOTE_ADDR']);

If we don’t have a cookie and the IP query comes up empty, the client hasn’t voted yet, so we can just send the HTML file which contains the form. Otherwise, we just send the results:

if (!isset($_COOKIE['vote_id']) && empty($ip_result)) {
  print file_get_contents(HTML_FILE);
}
else {
  poll_return_results($_COOKIE['vote_id']);
}

poll_submit()

function poll_submit() {
  global $db;
  global $options;

  $id = $_GET['poll'] || $_POST['poll'];
  $id = str_replace("opt", '', $id);

  $ip_result = $db->selectUnique(IP_DB, 0, $_SERVER['REMOTE_ADDR']);

  if (!isset($_COOKIE['vote_id']) && empty($ip_result)) {
    $row = $db->selectUnique(VOTE_DB, OPT_ID, $id);
    if (!empty($row)) {
      $ip[0] = $_SERVER['REMOTE_ADDR'];
      $db->insert(IP_DB, $ip);

      setcookie("vote_id", $id, time()+31556926);

      $new_votes = $row[OPT_VOTES]+1;
      $db->updateSetWhere(VOTE_DB, array(OPT_VOTES => $new_votes), new SimpleWhereClause(OPT_ID, '=', $id));

      poll_return_results($id);
    }
    else if ($options[$id]) {
      $ip[0] = $_SERVER['REMOTE_ADDR'];
      $db->insert(IP_DB, $ip);

      setcookie("vote_id", $id, time()+31556926);

      $new_row[OPT_ID] = $id;
      $new_row[OPT_TITLE] = $options[$id];
      $new_row[OPT_VOTES] = 1;
      $db->insert(VOTE_DB, $new_row);

      poll_return_results($id);
    }
  }
  else {
    poll_return_results($id);
  }
}

poll_submit() takes the form submission, checks if the client has already voted, and then updates the DB with the vote.

These lines get the selected option’s ID, and set $id to it:

$id = $_GET['poll'] || $_POST['poll'];
$id = str_replace("opt", '', $id);

We need to check whether the option is in the DB yet:

$row = $db->selectUnique(VOTE_DB, OPT_ID, $id);

If it is in the DB (result not empty), we need to run an updateSetWhere(). If it isn’t we need to do an insert():

if (!empty($row)) {
  $new_votes = $row[OPT_VOTES]+1;
  $db->updateSetWhere(VOTE_DB, array(OPT_VOTES => $new_votes), new SimpleWhereClause(OPT_ID, '=', $id));

  poll_return_results($id);
}
else if ($options[$id]) {
  $new_row[OPT_ID] = $id;
  $new_row[OPT_TITLE] = $options[$id];
  $new_row[OPT_VOTES] = 1;
  $db->insert(VOTE_DB, $new_row);

  poll_return_results($id);
}

Either way, we need to insert the IP into the DB, and set a cookie (expires in one year):

$ip[0] = $_SERVER['REMOTE_ADDR'];
$db->insert(IP_DB, $ip);

setcookie("vote_id", $id, time()+31556926);

poll_return_results()

function poll_return_results($id = NULL) {
    global $db;

    $html = file_get_contents(HTML_FILE);
    $results_html = "<div id='poll-container'><div id='poll-results'><h3>Poll Results</h3>\n<dl class='graph'>\n";

    $rows = $db->selectWhere(VOTE_DB,
      new SimpleWhereClause(OPT_ID, "!=", 0), -1,
      new OrderBy(OPT_VOTES, DESCENDING, INTEGER_COMPARISON));

    foreach ($rows as $row) {
      $total_votes = $row[OPT_VOTES]+$total_votes;
    }

    foreach ($rows as $row) {
      $percent = round(($row[OPT_VOTES]/$total_votes)*100);
      if (!$row[OPT_ID] == $id) {
        $results_html .= "<dt class='bar-title'>". $row[OPT_TITLE] ."</dt><dd class='bar-container'><div id='bar". $row[OPT_ID] ."'style='width:$percent%;'>&nbsp;</div><strong>$percent%</strong></dd>\n";
      }
      else {
        $results_html .= "<dt class='bar-title'>". $row[OPT_TITLE] ."</dt><dd class='bar-container'><div id='bar". $row[OPT_ID] ."' style='width:$percent%;background-color:#0066cc;'>&nbsp;</div><strong>$percent%</strong></dd>\n";
      }
    }

    $results_html .= "</dl><p>Total Votes: ". $total_votes ."</p></div></div>\n";

    $results_regex = '/<div id="poll-container">(.*?)<\/div>/s';
    $return_html = preg_replace($results_regex, $results_html, $html);
    print $return_html;
}

poll_return_results() generates the poll results, takes the HTML file, replaces the form with the results, and returns the file to the client.

First, lets grab the HTML file and set $html to it:

$html = file_get_contents(HTML_FILE);

Next, we start the results HTML structure:

$results_html = "<div id='poll-container'><div id='poll-results'><h3>Poll Results</h3>\n<dl class='graph'>\n";

To create the results HTML we need to get all the rows (options) from the DB sorted by number of votes:

$rows = $db->selectWhere(VOTE_DB,
  new SimpleWhereClause(OPT_ID, "!=", 0), -1,
  new OrderBy(OPT_VOTES, DESCENDING, INTEGER_COMPARISON));

We also need the total votes to calculate percentages:

foreach ($rows as $row) {
  $total_votes = $row[OPT_VOTES]+$total_votes;
}

Next, we calculate the percentage of votes the current option has:

foreach ($rows as $row) {
  $percent = round(($row[OPT_VOTES]/$total_votes)*100);

The HTML for the results will be a definition list (<dl>) styled with CSS to create bar graphs:

$results_html .= "<dt class='bar-title'>". $row[OPT_TITLE] ."</dt><dd class='bar-container'><div id='bar". $row[OPT_ID] ."'style='width:$percent%;'>&nbsp;</div><strong>$percent%</strong></dd>\n";

Also, we should check if the current option is the one the client voted for, and change the color:

if (!$row[OPT_ID] == $id) {

}
else {
  $results_html .= "<dt class='bar-title'>". $row[OPT_TITLE] ."</dt><dd class='bar-container'><div id='bar". $row[OPT_ID] ."' style='width:$percent%;background-color:#0066cc;'>&nbsp;</div><strong>$percent%</strong></dd>\n";
}

Here, we add a total vote count and close the html tags:

$results_html .= "</dl><p>Total Votes: ". $total_votes ."</p></div></div>\n";

This is a regex that finds the poll-container <div>:

$results_regex = '/<div id="poll-container">(.*?)<\/div>/s';

The last step in this function is to replace the poll form with the results using the regex, and return the result:

$return_html = preg_replace($results_regex, $results_html, $html);
print $return_html;

poll_ajax()

function poll_ajax() {
  global $db;
  global $options;

  $id = $_GET['vote'] || $_POST['vote'];

  $ip_result = $db->selectUnique(IP_DB, 0, $_SERVER['REMOTE_ADDR']);

  if (empty($ip_result)) {
    $ip[0] = $_SERVER['REMOTE_ADDR'];
    $db->insert(IP_DB, $ip);

    if ($id != 'none') {
      $row = $db->selectUnique(VOTE_DB, OPT_ID, $id);
      if (!empty($row)) {
        $new_votes = $row[OPT_VOTES]+1;

        $db->updateSetWhere(VOTE_DB, array(OPT_VOTES => $new_votes), new SimpleWhereClause(OPT_ID, '=', $id));
      }
      else if ($options[$id]) {
        $new_row[OPT_ID] = $id;
        $new_row[OPT_TITLE] = $options[$id];
        $new_row[OPT_VOTES] = 1;
        $db->insert(VOTE_DB, $new_row);
      }
    }
  }

  $rows = $db->selectWhere(VOTE_DB, new SimpleWhereClause(OPT_ID, "!=", 0), -1, new OrderBy(OPT_VOTES, DESCENDING, INTEGER_COMPARISON));
  print json_encode($rows);
}

poll_ajax() takes a request from the Javascript, adds the vote to the DB, and returns the results as JSON.

There are a few lines of code that are different from poll_submit(). The first checks if the Javascript just wants the results, and no vote should be counted:

if ($id != 'none')

The other two lines select the whole DB and return it as JSON:

$rows = $db->selectWhere(VOTE_DB, new SimpleWhereClause(OPT_ID, "!=", 0), -1, new OrderBy(OPT_VOTES, DESCENDING, INTEGER_COMPARISON));
print json_encode($rows);

CSS

.graph {
  width: 250px;
  position: relative;
  right: 30px;
}
.bar-title {
  position: relative;
  float: left;
  width: 104px;
  line-height: 20px;
  margin-right: 17px;
  font-weight: bold;
  text-align: right;
}
.bar-container {
  position: relative;
  float: left;
  width: 110px;
  height: 10px;
  margin: 0px 0px 15px;
}

.bar-container div {
  background-color:#cc4400;
  height: 20px;
}
.bar-container strong {
  position: absolute;
  right: -32px;
  top: 0px;
  overflow: hidden;
}
#poll-results p {
  text-align: center;
}
Poll Results

This CSS styles the results returned by the PHP or Javascript.

  • .graph styles the container for the bars, titles and percentages. The width will be different for each site.
  • .bar-title styles the titles for the bar graphs.
  • .bar-container styles the individual bar and percentage containers
  • .bar-container div styles the div that the bar is applied to. To create the bars, a percentage width is set with PHP or Javascript.
  • .bar-container strong styles the percentage.
  • #poll-results p styles the total votes.

Javascript

Introduction

The Javascript will intercept the submit button, send the vote with Ajax, and animate the results.

First, some global variables. You should recognize the first three from the PHP. votedID stores the ID of the option the client voted for.

var OPT_ID = 0;
var OPT_TITLE = 1;
var OPT_VOTES = 2;

var votedID;

Now we need a jQuery ready function which runs when the page loads:

$(document).ready(function(){

Inside that function we register the handler for the vote button which will run formProcess when it is triggered:

$("#poll").submit(formProcess);

We also need to check if the results <div> exists, and animate the results if it does:

if ($("#poll-results").length > 0 ) {
    animateResults();
}

If we have a cookie we should jump straight to generating the results because the user has already voted. To do that we need to get rid of the poll form, get the id from the cookie, grab the results from the PHP and pass them to loadResults().

if ($.cookie('vote_id'))
    $("#poll-container").empty();
    votedID = $.cookie('vote_id');
    $.getJSON("poll.php?vote=none",loadResults);
}

formProcess()

function formProcess(event){
  event.preventDefault();

  var id = $("input[@name='poll']:checked").attr("value");
  id = id.replace("opt",'');

  $("#poll-container").fadeOut("slow",function(){
    $(this).empty();

    votedID = id;
    $.getJSON("poll.php?vote="+id,loadResults);

    $.cookie('vote_id', id, {expires: 365});
    });
}

formProcess() is called by the submit event which passes it an event object. It prevents the form from doing a normal submit, checks/sets the cookies, runs an Ajax submit instead, then calls loadResults() to convert the results to HTML.

First, we need to prevent the default action (submitting the form):

event.preventDefault();

Next, we get the ID from the currently selected option:

var id = $("input[@name='poll']:checked").attr("value");
id = id.replace("opt",'');

input[@name='poll']:checked is a jQuery selector that selects a <input> with an attribute of name='poll' that is checked. attr("value") gets the value of the object which in our case is optn where n is the ID of the option.

Now that we have the ID, we can process it. To start, we fade out the poll form, and setup an anonymous function as a callback that is run when the fade is complete. Animations don’t pause the script, so weird things happen if you don’t do it this way.

$("#poll-container").fadeOut("slow",function(){

After it has faded out we can delete the form from the DOM using empty():

$(this).empty();

In this case, $(this) is jQuery shorthand for the DOM element that the fade was applied to.

jQuery has some other shortcut functions, including $.getJSON() which does GET request for a JSON object. When we have the object, we call loadResults() with it:

$.getJSON("poll.php?vote="+id,loadResults);

The last thing to do is set the cookie:

$.cookie('vote_id', id, {expires: 365});

loadResults()

function loadResults(data) {
  var total_votes = 0;
  var percent;

  for (id in data) {
    total_votes = total_votes+parseInt(data[id][OPT_VOTES]);
  }

  var results_html = "<div id='poll-results'><h3>Poll Results</h3>\n<dl class='graph'>\n";
  for (id in data) {
    percent = Math.round((parseInt(data[id][OPT_VOTES])/parseInt(total_votes))*100);
    if (data[id][OPT_ID] !== votedID) {
      results_html = results_html+"<dt class='bar-title'>"+data[id][OPT_TITLE]+"</dt><dd class='bar-container'><div id='bar"+data[id][OPT_ID]+"'style='width:0%;'>&nbsp;</div><strong>"+percent+"%</strong></dd>\n";
    } else {
      results_html = results_html+"<dt class='bar-title'>"+data[id][OPT_TITLE]+"</dt><dd class='bar-container'><div id='bar"+data[id][OPT_ID]+"'style='width:0%;background-color:#0066cc;'>&nbsp;</div><strong>"+percent+"%</strong></dd>\n";
    }
  }

  results_html = results_html+"</dl><p>Total Votes: "+total_votes+"</p></div>\n";

  $("#poll-container").append(results_html).fadeIn("slow",function(){
    animateResults();});
}

loadResults() is called by $.getJSON() and is passed a JSON object containing the results DB. It is pretty much the same as it’s PHP counterpart poll_return_results() with a few exceptions. The first difference is that we set the width on all the bars to 0% because we will be animating them. The other difference is that we are using a jQuery append() instead of regex to show the results. After the results fade in, the function calls animateResults().

animateResults()

function animateResults(){
  $("#poll-results div").each(function(){
      var percentage = $(this).next().text();
      $(this).css({width: "0%"}).animate({
                width: percentage}, 'slow');
  });
}

animateResults() iterates through each of the bars and animates the width property based on the percentage.

each() is a jQuery function that iterates through each element that is selected:

$("#poll-results div").each(function(){

First, we set the percentage to the text of the element next to the bar which is the <strong> containing the percentage.

var percentage = $(this).next().text();

Then we make sure the width is set to 0%, and animate it:

$(this).css({width: "0%"}).animate({
  width: percentage}, 'slow');

UI Candy: Audi’s new MMI

Audi is set to release the next version of their MMI (Multi Media Interface). The MMI powers their nav, radio, and car systems.

While I prefer Garmin’s UI simplicity, Audi’s Nav UI is my aesthetic favorite. They pay attention to type, proportions, opacity, shapes and shading in a way that says “we really care about how this looks.”

From an information design perspective, I’ve always been a fan of how they present and combine distance and time. I’ve used lots of nav systems and somehow, for me, Audi’s is the one that presents the right information at the right time in the right way. I do like Honda’s too.

Here are some screenshots from Audi’s latest effort:

And here’s part of their lab where they test the designs. The different dashes are from different models.

Read more about the new MMI at Fourtitude or Audiworld.

UI Porn: Audi’s new MMI

Audi is set to release the next version of their MMI (Multi Media Interface). The MMI powers their nav, radio, and car systems.

While I prefer Garmin’s UI simplicity, Audi’s Nav UI is my aesthetic favorite. They pay attention to type, proportions, opacity, shapes and shading in a way that says “we really care about how this looks.”

From an information design perspective, I’ve always been a fan of how they present and combine distance and time. I’ve used lots of nav systems and somehow, for me, Audi’s is the one that presents the right information at the right time in the right way. I do like Honda’s too.

Here are some screenshots from Audi’s latest effort:

Read more about the new MMI at Fourtitude or Audiworld.

Paint Or Die But Love Me

Paint-Or-Die-But-Love-Me.jpg

No it's not real but you've got to give French designer John Nouanesing props for his collection of concepts including this table which while needing some structural help is pretty fun.

via ffffound

...

Font Conferece Video for All Types

font_meeting.jpg

College Humor's Font Conference video wasn't long enough so they made it double-spaced.

...

This Week from Tokyo


+ The Mesh Tarp Tote Bag from Plus Minus Zero, now available in the four color variations pictured above.


+ Tokyo designer Nosigner exhibits his edible Spring Rain lights and "A leaf x 10" placemats in Amsterdam this weekend (July 27-28) at Super Store 05.


+ You have until this weekend (July 27) to catch an exhibition featuring furniture works by the late great Shiro Kuramata at Limart in Ebisu. JS

This Week from Tokyo

+ The Mesh Tarp Tote Bag from Plus Minus Zero, now available in the four color variations pictured above. + Tokyo designer Nosigner exhibits his edible Spring Rain lights and "A leaf x 10" placemats in Amsterdam this weekend (July 27-28) at Super Store 05. + You have until this weekend (July 27) to catch an exhibition featuring furniture works by the late great Shiro Kuramata at Limart in Ebisu. JS

Modal overlays beyond the dialog box

Aza recently posted on modal overlays, those dialogs that pop up and disable the background behind them. You can click anywhere inside modal overlays, but you can’t click anything in background until the dialog goes away.

Usually when we think of modals, we think of dialog boxes like the one below from Google Documents. Aza’s critique applies to this kind of modal. After you call up the find/replace box, you can’t click anywhere but inside the dialog. That means you can’t scroll the document underneath the dialog or copy and paste a word from the document into the dialog box while the dialog box is displayed.

But that’s not the only kind of modal overlay. Check out this Preference pane from Apple’s Me.com. It has nothing to do with modifying the content behind it. It could just as well be a separate screen.

Actually, this fact that it could be a separate screen caught my interest. At 37 we never use modal overlays. All our settings screens are completely independent from the other screens in the app. In order to explore the difference between these two approaches, I mocked up an alternate version of Apple’s preference screen that fills the entire window like a typical web app might.

It’s interesting to compare these two versions. I have to admit I like the modal one a lot better. On the one hand it has more visual interest and depth. On the other, it raises some interesting questions about navigation.

Modals as alternatives to navigation

Two questions that often float in our minds when we use software are “Where am I?” and “How do I get back?” There are common techniques we use to ease these concerns like tabbed interfaces, breadcrumbs and “Cancel” links. We should think of the modal overlay as a tool in the same family. It is uniquely powerful at quieting these nervous questions. “Where am I?” is a non-starter because you never left the original screen. And “How do I get back?” is trivial when the original screen remains visible in the background.

Screen size as a reflection of importance

Another thing I like about the modal approach to Preferences is that the preference screen doesn’t feel equal to the other application screens. You get the feeling it didn’t deserve its own browser window’s worth of real estate.

When we design the UI for a particular screen we always try to make the important and frequently-used elements larger and more prominent than the lesser-used elements. It’s a good rule of thumb to think that if elements in the same context all have the same size, then they must be equally important. Apple’s Preferences modal applies the same principle to the scale of entire screens. The preferences screen is itself smaller than the browser window that plays host to the more important screens full of real data.

Modals aren’t all bad

While Aza’s critique still holds for modals like the Google docs example above, Me.com demonstrates that modal overlays do have a place as an alternative to navigating between independent screens. It’s also very interesting to consider which screens really deserve their own browserful of real estate and which should be reduced to substates of other screens. I suspect that when people praise applications for being particularly “Ajaxed” or “Desktop” in style, this lack of navigation between separate screens is a big part of the appeal. Apple has shown that it’s possible to bring desktop-style interactions into web apps without falling into the extreme of a desktop clone. It should be fun to see where other designers take the inspiration.

Smashy The Alien Icon Set

We are always looking for creative and talented artists and designers. Once we find them, we ask them to cooperate with us and release something for free. We provide them with the full freedom to showcase their professionalism and express their creativity. And we support them financially and with a broad coverage in our magazine. Every release helps to make the Web a nicer place. In fact, the results are quite often pretty impressive. You can find our previous releases in our section Freebies.

Smashing Icon Set

Today we are glad to release a free Smashy The Alien icon set. The set contains 8 icons (RSS, news, home, download, contact, calendar, blog and Smashing) with a nice modest alien who is just too shy to show his face completely. You can use the set for private and commercial projects, blogs and web-sites for free — without any restrictions whatsoever.

The icons are available in .ico and .png-formats in resolutions 32×32px, 48×48px, 64×64px and 128×128px. If you love Smashing Magazine just like Smashy does feel free to place him on your blog.

This icon set was designed by Maja Bencic aka Abeja from Croatia especially for Smashing Magazine and its readers.

Download Icon Set For Free!

You can use the icons for private and commercial projects, blogs and web-sites for free, without any restrictions whatsoever. However, you are not allowed to sell or redistribute the icons without author’s and Smashing Magazine’s permission.

Smashing Icon Set

Motivation behind the design

Maja contacted us through our contact form and asked if we are interested in some kind of cooperation. We were impressed by Maja’s work, so we have comissioned Maja to design a memorable, lively and beautiful icon set for our readers.

Here are some insights about the motivation behind the design from the designer herself:

I prefer clean and simple designs with lively colors and original elements such as icons. Since I love creating characters and try to include them often in my designs, I wanted to use them for a set of trendy and cute icons inspired with cartoons and picture books.

I think these icons could be used to make web-sites more lively and friendly no matter how serious they are supposed to be. At least that’s how I like my web-projects to be. I hope people will find a way for incorporating some or all of these icons into their designs.

I started as a web designer 6 years ago, but recently I do a lot of graphic design and illustrations as well. Some of my work is presented on my website abeja.org.

Maja Benčić

Thank you, Maja!

Want to showcase your work as well?

Please notice again: we are regularly looking for creative designers and artists and we are more than happy to support them financially and with a broad coverage in our magazine. If you think you can design a professional icon set, theme, wallpaper, typeface, screensaver or whatever — feel free to contact us. You may not know it yet, but we might feature you in one of our upcoming posts.

100,000 Portfolios at Coroflot.com - Our Portfolio & Design Job Site Flips to Six Digits!

100koflot.jpg

We are proud to declare:
COROFLOT HIT 100,000 PORTFOLIOS TODAY!

That's right, some lucky designer posted their work at coroflot.com today and rolled the odometer to 100,000!

For those of you who might not know: Coroflot is Core77's portfolio hosting / design job board / creative social networking site. It started out here way back in '97 and got its own digs a few years thereafter. It's been growing ever since and is now the largest site of its kind, serving up millions of page views of designers' work and 100's of design jobs each month.

Go check it out today, we have some cool additions in the works so sign up before the rush!

...

Pint, Inc.: Assistant Creative Director

Full-time

(San Diego, CA) You will be responsible for maximizing the creativity and productivity of the design team, and working with the team to execute projects. Successful candidates will posses a passion for design, extensive graphic design experience, excellent presentation and project management skills.

Responsibilities:
Design websites, Flash apps/components, logos, and branding.
Meet with clients and/or Project Managers to discuss project requirements.
Maintenance.
Produce comprehensive visuals for client’s conceptual needs.
As