I’m using an RSS feed script to import news feeds into on one of my sites. The problem is that the RSS links open by default on the current window. Instead I want the RSS links to open in a new window only. That is, all external links on the page need to open as
_blank. And all internal links (links to current site) should open in the current window.
It seems this is something that should be part of the RSS script, unfortunately the script I’m using does not have that functionality. Or at least not in an easily configurable way that I could find.
Having no time to delve into the innards of the RSS script instead I opted to override the links behavior using JQuery. See the solution below.
Solution for jQuery Error: uncaught exception: Syntax error, unrecognized expression: [@href^="http"]
While working on a jQuery script for forcing external links to open in a new window I came across the following error:
Error: uncaught exception: Syntax error, unrecognized expression: [@href^="http"]
See the solution below: