我有以下例子:。
When you click on 2010 I need valuation to disappear with the list items.
Here is the code which I am using to do this:
$("#yearfilter a").live("click", function(e) {
e.preventDefault();
//var v = $(this).val();
var v = $(this).attr("data-value");
if(v.length > 0) {
$( tr.reports ).show();
$( tr.reports ul ).hide();
$( tr.reports ul.year- +v).show();
$( tr.reports ).each(function() {
if($( ul:visible , this).size() == 0) {
$(this).hide();
}
});
} else {
$( tr.reports ).show();
$( tr.reports ul ).show();
}
});