Skip to content

Instantly share code, notes, and snippets.

@floydpink
Created December 5, 2012 19:45
Show Gist options
  • Save floydpink/4218866 to your computer and use it in GitHub Desktop.
Save floydpink/4218866 to your computer and use it in GitHub Desktop.
Adding a 'Open in a new window' link on SharePoint document libraries
$(document).ready(function() {
$("td[class='ms-vb-title'] table[class='ms-unselectedtitle'] tbody tr td[class='ms-vb'] a").each(function() {
var externalWindowLink = ' <a href="' + $(this).attr("href") + '" target="_blank" title="Click here to open the link in a new window"><span style="color:green;font-size:smaller;">New Window</span></a>';
$(this).parent().append(externalWindowLink);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment