宿泊施設セクションのページのさまざまなパラメーターに基づいてフィルター処理するページを取得しようとしています。ただし、フィルターを連携させることはできないため、ユーザーが 1 つのセクションをクリックすると、他のセクションと連携します。
フィドルはhttp://jsfiddle.net/ktcle/YEtgM/2/です
助けてくれてありがとう
$('input').change(function(){
$('input').each(function(){
var checked = $(this).attr('checked') || false;
var numberofrooms = $(this).data('bedrooms');
var sitelocation = $(this).data('location');
$('li').each(function(){
if ($(this).data('bedrooms')==numberofrooms){
checked ? $(this).show() : $(this).hide();
}
if ($(this).data('location')==sitelocation){
checked ? $(this).show() : $(this).hide();
}
});
});
});