Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAntonio De Rose
20,885 Pointssame code, does not open in a new window
const $secureLinks = $('a[href^="https://"');
$secureLinks.attr('target','_blank')
2 Answers
Antonio De Rose
20,885 Pointsit is working now, thanks anyway., what I did was CTRL + F5
Steven Parker
231,269 PointsThis code seems to be OK, but what's the HTML look like that it works on?
Saqib Ishfaq
13,912 PointsSaqib Ishfaq
13,912 Pointsjust to add you forgot closing square bracket there.... const $secureLinks = $('a[href^="https://"]'); and a semi colon to end the 2nd statement.... $secureLinks.attr('target','_blank');
it might work without these but just incase:)