The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Attaching a target propety to certain links

  • # April 15, 2010 at 4:37 pm

    Hey guys an gals,

    I’m pulling in an rss feed from a FaceBook Notes app via WP’s RSS widget, and it’s all hunky-dory, except that I want the resulting links to have a ‘target="_blank"’ property. WordPress is giving those links a class, which I can work away with for styling via CSS, but is there a way (I’m thinking JQuery) of attaching properties too?

    # April 15, 2010 at 5:53 pm

    This reply has been reported for inappropriate content.

    return false;

    This will open any <a> link, that has a class of "example" and begins with "http", in a new window.

    # April 16, 2010 at 8:41 pm

    My thanks! That goes in the snippets folder!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed