Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would like to know how can I edit in SharePoint 2010 Standard version so that when a user clicks on any link list item, uploaded or attached files in a announcement and document lists to be opened in a new tab (target="_blank")

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You can use Jquery with something like

$('a').each(function() { this.prop('target','_blank'); });

If you want to limit it you can add .filter('.classname') or a jquery filter contains.

(Remember to have jquery available for this to work, you will need to upload and link jquery-latest to the site)

share|improve this answer
    
Since I am using Link lists only for external links I only want these and any PDFs in Document and and Announcement lists to globally open in new page. Every other link in a page I will handle manually –  Rick Dec 10 '12 at 14:09
    
then you can use a combination of find() contains() other dom filters in jquery to get the ones you want. A good solution is to get the surrounding html with $('#surrounding') then use find to filter it $('#surrounding').find('a') something like that. –  Hugh Wood Dec 10 '12 at 14:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.