...
|
...
|
@@ -44,7 +44,7 @@ $('.search-entry').click(function() { |
|
|
$searchWrap.show();
|
|
|
});
|
|
|
|
|
|
$searchForm.on('keyup', '#search-key', function(e) {
|
|
|
$searchKey.keyup(function(e) {
|
|
|
var key = $searchKey.val();
|
|
|
|
|
|
if (e.which === 13) {
|
...
|
...
|
@@ -60,6 +60,23 @@ $searchForm.on('keyup', '#search-key', function(e) { |
|
|
}
|
|
|
});
|
|
|
|
|
|
// ie8输入框提示特殊处理
|
|
|
if ($.browser && $.browser.msie && parseInt($.browser.version, 10) === 8) {
|
|
|
$searchKey.focus(function() {
|
|
|
var key = $searchKey.val();
|
|
|
|
|
|
if (key === 'search') {
|
|
|
$searchKey.val('').css('color', '#fff');
|
|
|
}
|
|
|
}).blur(function() {
|
|
|
var key = $searchKey.val();
|
|
|
|
|
|
if ($.trim(key) === '') {
|
|
|
$searchKey.val('search').css('color', '#aaa');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$clearInput.click(function() {
|
|
|
$searchKey.val('');
|
|
|
$(this).hide();
|
...
|
...
|
|