Tag: JQuery

JQuery: Open external links in new window

Finally got round to writing a small bit of code to automatically force anchor links to open in new windows if they are for different domains: $(document).ready(function() { var myDomain = ["www.ajgraham.com", "testing.ajgraham.com", "lifestream.ajgraham.com"]; //do NOT include the http:// pls! $(“a[href^='http://']“).each(function() { var slicedHref = $(this).attr(‘href’).slice(7); var slashPosition = slicedHref.indexOf(“/”); [...]

Simple but powerful JQuery Form Validation

I wrote a relatively simple and intuitive form validation script for a client, which they kindly allowed me to release into the open-source community. Contents The Objective The Basics Including The JavaScript Explaining The Code Core Functions Expanded Functions Options HTML Examples Download License To-Do’s Change-log The Objective The aim [...]