QA Graphic

Add Link Check - JQuery

Using Add Link Check to find certain links

There's a cool jQuery trick to check to see if all the hyperlinks on the current page are going to a certain URL. This is useful if you want a quick way to make sure that links are pointing to a Dev environment.

Enable jQuery

if the site isn't using jquery, you'll need to add it, if you don't know it doesn't hurt to run this as it won't break the site (Unless the site is using some bleeding edge jQuery code.)

Open up the Chrome Console and paste the following:

var script = document.createElement("script");
script.setAttribute("src", "[](");
script.addEventListener('load', function() {
var script = document.createElement("script");
}, false);

You should get back the following:

<script src="[]("></script>

Now run this:

$("a[href*='[](']").css("color", "orange");

This will highlight any link going to []( to orange. You probably won't see any changes on your site, so change it to something reasonable.

If something did get changed, you should see how many links got changed:




jQuery is the most popular Javascript library on the Internet. Chances are that websites that your testing use it. These posts are all about tips and tricks for QA testing.


ThursdayGluten Free
SaturdayInternet Tools
SundayOpen Topic
Monday Media Monday
WednesdayKeyboard Maestro