Content Server: Fi usage of jQuery pseudo selectors

This commit is contained in:
Kovid Goyal 2009-12-02 01:50:40 +00:00
parent 92f72c027a
commit 7cefca28fe

View File

@ -148,13 +148,13 @@ function fetch_library_books(start, num, timeout, sort, order, search) {
$("#book_list tbody").html(display);
$("#book_list tbody tr").bind('mouseenter', function() {
var row = $(this);
$('#book_list tbody tr:even()').css('background-color', '#eeeeee');
$('#book_list tbody tr:odd()').css('background-color', 'white');
$('#book_list tbody tr:even').css('background-color', '#eeeeee');
$('#book_list tbody tr:odd').css('background-color', 'white');
row.css('background-color', "#fff2a8");
row.bind('mouseleave', function(){
row.css('background-color', "white");
$('#book_list tbody tr:even()').css('background-color', '#eeeeee');
$('#book_list tbody tr:even').css('background-color', '#eeeeee');
row.unbind('mouseleave');
});
});
@ -173,7 +173,7 @@ function fetch_library_books(start, num, timeout, sort, order, search) {
layout();
$('#book_list tbody tr:even()').css('background-color', '#eeeeee');
$('#book_list tbody tr:even').css('background-color', '#eeeeee');
},
complete : function(XMLHttpRequest, textStatus) {
@ -262,6 +262,7 @@ function setup_sorting() {
if (sort_indicator.html() == '↑') {
order = 'descending'; html = '↓';
}
sort_indicator.html(html);
$('#book_list * .sort_indicator').css('visibility', 'hidden');
sort_indicator.css('visibility', 'visible');