Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: dsingleton/icon-selector
base: 93f663f78e
...
head fork: dsingleton/icon-selector
compare: ef78bf97ad
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 20 additions and 5 deletions.
  1. +5 −0 icons.css
  2. +9 −5 icons.js
  3. +6 −0 readme.textile
View
5 icons.css
@@ -121,3 +121,8 @@ ol.icons li img {
ol.icons li a:hover {
background: #ddd;
}
+
+ol.icons li a.no-match:hover {
+ background: none;
+ cursor: default;
+}
View
14 icons.js
@@ -1,7 +1,9 @@
$(document).ready(function() {
- var icon_list = $('ol.icons');
- var preview = $('#preview');
+ var icon_list = $('ol.icons'),
+ preview = $('#preview'),
+ search_input = $('#search'),
+ initial_hash = window.location.hash.substring(1);
// #1 Generate icon links
$.each(icon_data, function(i, icon) {
@@ -14,7 +16,7 @@ $(document).ready(function() {
icon_links.mouseenter(function(event) {
var elem = $(event.target).parent();
- if (elem.hasClass('no-match')) {
+ if (!elem.hasClass('no-match')) {
preview.offset({
'left': elem.offset().left - 24,
'top': elem.offset().top - 24
@@ -27,7 +29,7 @@ $(document).ready(function() {
});
- $('#search').keyup(function() {
+ search_input.keyup(function() {
apply_filter(this.value);
preview.hide();
});
@@ -38,5 +40,7 @@ $(document).ready(function() {
$(this).toggleClass('no-match', (this.title.indexOf(value) == -1));
});
};
- apply_filter(window.location.hash.substring(1));
+
+ apply_filter(initial_hash)
+ search_input.val(initial_hash);
});
View
6 readme.textile
@@ -6,6 +6,12 @@ Released under a CC-Attribution lience and with 1,000 icons (16x16 size) it's a
But with than many icons it can be a pain to find the one you want, so this tool helps you filter down by keyword.
+h2. Demo
+
+You can see a "demo running here":http://dsingleton.github.com/icon-selector
+
+It takes a little while to due to the 1000 individual icons being loaded, it's faster on a local file system.
+
h2. Generate.py
Creates a JSON data file of icons from the contents of icons/

No commit comments for this range

Something went wrong with that request. Please try again.