Friday, May 20, 2016

context menu with JavaScript (Script Editor Web Part)

We script in Script Editor webpart on the page


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $(".ms-list-itemLink > a").each(function(){
        this.setAttribute("onclick","ShowECBMenuForTr(this.parentNode, event); return false;");
    });
});
</script>

No comments:

Post a Comment