Force External Links to Open in a New Window Using JQuery

headmaster @ 11:15 pm


jQery LogoI’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.

(more…)

Solution for jQuery Error: uncaught exception: Syntax error, unrecognized expression: [@href^="http"]

headmaster @ 10:57 pm


JQuery LogoWhile 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:

(more…)

Researching a WordPress Related Links Solution

headmaster @ 10:07 pm


WordPress LogoI want to display a list of related links for each post on my blog; this very blog in fact. I also want to be able to add external links to the related links from my site seamlessly. It is unfortunate that WordPress doesn’t have such a feature as a default widget, being that it is something very common across the web nowadays. So I’m going to be installing and trying a variety of available plugins in order to find the features I want. Should I not find exactly what I want I will then resort to rolling my own.

(more…)



Ajax CSS CSS gradients CSS rounded corners CSS Style Sheets CSS Transparency error Failed Evaluations footer header image gallery JavaScript javaScript JavaScript Errors jQuery jquery Lightbox light box links open source PHP PHP PHP scripts Pretty Photo prettyPhoto Programming Languages Script Evaluations Search Engine Optimization StatusNet StatusNet themes templates themes Useful CSS Code Useful WordPress Code Web Applications Web Design Web Development Webmaster Toolbelt WordPress wordpress Word Press WordPress 3.3.2 word press links WordPress Plugins wordpress theme
  • Digital Goodies