Permalink
Browse files

Cleanup for release, kill the todo list, switch from style-modificati…

…on to classes for hiding non-matching icons
  • Loading branch information...
1 parent 61f383d commit 93f663f78ee7b2aee92632a8cc92cf1aec8128ab @dsingleton committed Mar 5, 2013
Showing with 14 additions and 23 deletions.
  1. +10 −2 icons.css
  2. +4 −5 icons.js
  3. +0 −16 index.html
View
@@ -101,8 +101,16 @@ ol.icons li {
ol.icons li a {
display: block;
float: left;
- -webkit-transition: opacity ease-in .75s;
- -moz-transition: opacity ease-in .75s;
+ -webkit-transition: opacity ease-in .5s;
+ -moz-transition: opacity ease-in .5s;
+}
+
+ol.icons li a.no-match {
+ opacity: .1;
+}
+
+#preview a.no-match {
+ opacity: 1;
}
ol.icons li img {
View
@@ -11,10 +11,10 @@ $(document).ready(function() {
var icon_links = $('ol.icons li a');
- // #3 Hover preview
+
icon_links.mouseenter(function(event) {
var elem = $(event.target).parent();
- if (elem.css('opacity') > .5) {
+ if (elem.hasClass('no-match')) {
preview.offset({
'left': elem.offset().left - 24,
'top': elem.offset().top - 24
@@ -26,7 +26,7 @@ $(document).ready(function() {
preview.hide();
});
- // #2 Filtering search
+
$('#search').keyup(function() {
apply_filter(this.value);
preview.hide();
@@ -35,8 +35,7 @@ $(document).ready(function() {
var apply_filter = function(value) {
window.location.hash = value;
icon_links.each(function() {
- var opacity = (this.title.indexOf(value) >= 0) ? 1 : 0.1;
- $(this).css('opacity', opacity);
+ $(this).toggleClass('no-match', (this.title.indexOf(value) == -1));
});
};
apply_filter(window.location.hash.substring(1));
View
@@ -11,22 +11,6 @@
<script type="text/javascript" src="icon_data.js"></script> <!-- defines 'var icon_data = [...]' -->
<script type="text/javascript" src="icons.js"></script>
-
- <!-- TODO
- * Scale up preview image
- * Dock preview image to side, with more info
- * async jquery
- * big search
- * Classes for match.not,
- * no cursor for unmatched
- * better contrast for matched items
- * performance
- * new read me
- * gh-pages
- * kill from website
- -->
-
-
</head>
<body>
<header>

0 comments on commit 93f663f

Please sign in to comment.