1
0
Fork 0
forked from wezm/wezm.net

Some search improvements and fixes for Firefox

This commit is contained in:
Wesley Moore 2010-07-07 17:58:40 +10:00
parent 6804ca2ae9
commit e6907f7d7a
4 changed files with 12 additions and 4 deletions

View file

@ -8,6 +8,11 @@ body
min-width: 960px min-width: 960px
// HTML5 expectations - should go in reset perhaps
header, footer, nav, article
display: block
p, li, blockquote p, li, blockquote
line-height: 1.2 line-height: 1.2

View file

@ -11,4 +11,5 @@
<link rel="alternate" href="http://feeds.feedburner.com/wezm-technical" type="application/atom+xml" title="WezM.net - Technical Articles" /> <link rel="alternate" href="http://feeds.feedburner.com/wezm-technical" type="application/atom+xml" title="WezM.net - Technical Articles" />
<link rel="alternate" href="http://feeds.feedburner.com/wezm-personal" type="application/atom+xml" title="WezM.net - Personal Articles" /> <link rel="alternate" href="http://feeds.feedburner.com/wezm-personal" type="application/atom+xml" title="WezM.net - Personal Articles" />
<script src="/js/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script> <script src="/js/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/js/jquery.timers-1.1.2.js" type="text/javascript" charset="utf-8"></script>
<script src="/js/application.js" type="text/javascript" charset="utf-8"></script> <script src="/js/application.js" type="text/javascript" charset="utf-8"></script>

View file

@ -26,13 +26,13 @@ jQuery(function() {
if(article.css('opacity') != style.opacity) article.animate(style, {queue: false, duration: 500}); if(article.css('opacity') != style.opacity) article.animate(style, {queue: false, duration: 500});
}); });
} }
$('#search').show();
var input = $('#search input'); var input = $('#search input');
if(input.length > 0) { if(input.length > 0) {
// Setup incremental search on Articles pages // Setup incremental search on Articles pages
if(!(input.attr("onsearch") === undefined)) { if(input.get(0).hasOwnProperty('onsearch')) {
console.log("Using search event for search"); console.log("Using search event for search");
$('#search label').hide();
input.bind("search", refresh_search); input.bind("search", refresh_search);
} }
else { else {
@ -52,6 +52,8 @@ jQuery(function() {
input.stopTime(); input.stopTime();
}); });
} }
input.val('');
} }
$('#search').show();
}); });

View file

@ -16,8 +16,8 @@ jQuery(function () {
alt: photo.attr('title'), alt: photo.attr('title'),
}; };
var li = $(render_image(image)); var li = $(render_image(image));
$('img', li).css({left: (i * -75) + 'px'}); $('img', li).css('left', (i * -75) + 'px');
li.css({"background-position-x": (i * -75) + 'px'}); li.css("background-position", (i * -75) + 'px -75px');
ul.append(li); ul.append(li);
}); });
$("a[rel^='prettyPhoto']").prettyPhoto({theme: "facebook"}); $("a[rel^='prettyPhoto']").prettyPhoto({theme: "facebook"});