Skip to content

Instantly share code, notes, and snippets.

@stevehorn
Created August 19, 2010 12:33
Show Gist options
  • Save stevehorn/537765 to your computer and use it in GitHub Desktop.
Save stevehorn/537765 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript">
$().ready(function() {
var options = $("select").find("option").get();
var dupesRemoved = $.unique(options);
//This pops up a deuce... any idea why?
alert(dupesRemoved.length);
});
</script>
</head>
<body>
<select>
<option>something</option>
<option>something</option>
</select>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment