Wednesday, May 13, 2015

SharePoint : How to open pdf document in the new tab document library in SharePoint 2013

Best way o use client side rendering ,below code will implement the script

<script type="text/javascript">

    $(function () {

        $("a[href$='.pdf']").removeAttr("onclick");

        $("a[href$='.pdf']").removeAttr("onmousedown");

        $("a[href$='.pdf']").attr("target", "_blank");       

    });

</script>


No comments:

Post a Comment