Sharepoint Refinement面包屑

时间:2018-03-06 05:30:10

标签: sharepoint sharepoint-2013 breadcrumbs refinements

根据附件,如何在SharePoint中创建细化痕迹?

请帮帮我。谢谢......

enter image description here

1 个答案:

答案 0 :(得分:0)

我们可以使用jQuery来实现它,下面的代码供您参考:

<script src="//code.jquery.com/jquery-1.12.4.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () { 
    buildBreadcrumb();
    $("select[title='Department']").change(function(){
        buildBreadcrumb();
    });
    $("select[title='Branch']").change(function(){
        buildBreadcrumb();
    });
    $("select[title='Sub Branch']").change(function(){
        buildBreadcrumb();
    });
});
function buildBreadcrumb(){
    var department = $("select[title='Department']").val();
    var branch = $("select[title='Branch']").val();
    var subBranch = $("select[title='Sub Branch']").val();
    $("#refBreadcrumb").html(department+">>"+branch+">>"+subBranch);
}
</script>
<div id="refBreadcrumb"></div>