Why does this work, but the second example does not work?
The first one works.
function someFunk() { $('.listOne li').filter(':odd').css('background-color', '#FFFFFF'); $('.listOne li').filter(':even').css('background-color', '#F0F0F0'); };
The second one does not work.
function someFunk() { $('.listOne li').filter(':odd').css('background-color', '#FFFFFF').filter(':even').css('background-color', '#F0F0F0'); };
Can I not bind .filter () in jquery?
source share