$("button").click(function() { var show = $(this).attr('class'); $('.post').each(function(){ $(this).show(); var test = $(this).attr('class'); if (test.indexOf(show) <0) $(this).hide(); }); });
FIRST
TWO
One Washington
One Philadelphia
Two Philadelphia
Two Washington
One Philadelphia
Two Washington
One Philadelphia
有关每个步骤的详细信息,请参阅逻辑中的注释。
$("button").click(function() { //remove the selected class from the previously selected button $(this).closest('.filter').find('button.selected').removeClass('selected'); //put the class on the button you clicked $(this).addClass('selected'); //get the data-filter off of the selected buttons and join them into a selector var filter = '.'+ $('button.selected').map(function(){ return $(this).data('filter'); }).get().join('.'); //hide all the posts, and then show those that match $('.post').hide().filter(filter).show(); });
本文介绍了阿里Treebased Deep Match(TDM)的学习笔记,同时回顾了工业界技术发展的几代演进。从基于统计的启发式规则方法到基于内积模型的向量检索方法,再到引入复杂深度学习模型的下一代匹配技术。文章详细解释了基于统计的启发式规则方法和基于内积模型的向量检索方法的原理和应用,并介绍了TDM的背景和优势。最后,文章提到了向量距离和基于向量聚类的索引结构对于加速匹配效率的作用。本文对于理解TDM的学习过程和了解匹配技术的发展具有重要意义。 ...
[详细]