1
0
Fork 0
forked from wezm/wezm.net

Get articles pages working on iPhone

This commit is contained in:
Wesley Moore 2010-07-13 08:02:36 +10:00
parent 56a9b4b636
commit 2ab3615485
2 changed files with 25 additions and 20 deletions

View file

@ -40,6 +40,18 @@ ul.articles li
padding-top: 0 padding-top: 0
height: auto height: auto
nav.search
li
display: list-item
margin: 1em 0 0 0
font-size: large
#search
float: none
#flickr #flickr
header header

View file

@ -28,26 +28,19 @@ jQuery(function() {
var input = $('#search input'); var input = $('#search input');
if(input.length > 0) { if(input.length > 0) {
// Setup incremental search on Articles pages // Poll the field for its value while it has focus
if('onsearch' in input.get(0)) { var last_value;
$('#search label').hide(); input.focus(function() {
input.bind("search", function() { refresh_search(this) }); last_value = input.val();
} input.everyTime('500ms', function() {
else { if(input.val() != last_value) {
// Poll the field for its value while it has focus refresh_search(input);
var last_value; last_value = input.val();
input.focus(function() { }
last_value = input.val();
input.everyTime('500ms', function() {
if(input.val() != last_value) {
refresh_search(input);
last_value = input.val();
}
});
}).blur(function() {
input.stopTime();
}); });
} }).blur(function() {
input.stopTime();
});
input.val(''); input.val('');
} }
$('#search').show(); $('#search').show();