私の関数は、データ属性に基づいてアイテムのフィルター処理された(配列)リストを返します。
この関数を連鎖可能にできるかどうかを教えてください。
$(document).ready(function (){
function filterSvcType (svcType) {
var selectedServices = $("#service-list div");
var chose = selectedServices.filter(function() {
return $(this).data("service-type") == svcType;
});
console.log(chose);
}
filterSvcType("hosting");
});
私がやりたいのは、次のように呼ぶことです。
filterSvcType("hosting").fadeOut();
どうすればよいですか?