A little while back I posted how to set cookies with jQuery and was asked about the domain setting and how setting the domain affects sub domains. This post explains how cookies and domains work, and … [Read more...] about Cookies and domains
Javascript
Example scripts and howtos for Javascript
Javascript is a programming or scripting language primarily used for client-sided programming in web browsers. It can also be used as a server-side programming language but this is generally used less often. Javascript was originally created by Netscape for their browser Netscape Navigator, and is now an implementation of the ECMAScript standard. It is typically used in web browsers for form validation, floating navigation, AJAX and other nifty things to make web pages more interactive.
Use jQuery to make all offsite links open in a new window
XHTML Strict does not allow opening links in a new window using target=""_blank"" so instead you can use jQuery to add the target attribute to all <a> tags after the page has loaded and still … [Read more...] about Use jQuery to make all offsite links open in a new window
Inject HTML content into Disqus and jQuery
My last post looked at how to run Javascript functions after Disqus has loaded using their undocumented callback functions. The reason I needed to do this myself was to inject some additional content … [Read more...] about Inject HTML content into Disqus and jQuery
Open a jQuery Facebox on page load
I was asked this morning how to go about opening a jQuery Facebox when the page loads; while I normally find dialogs that open in this way somewhat annoying they do have their uses when trying to show … [Read more...] about Open a jQuery Facebox on page load
Find the index of an item in a Javascript array
Javascript 1.6 introduced the Array.indexOf() function. Javascript 1.6 is available in Firefox from version 1.5 and current versions of Chrome, Safari and Opera; importantly, it is not in any versions … [Read more...] about Find the index of an item in a Javascript array
jQuery Superfish Menus Plug-in and Caching the menu
My last jQuery post looked at the Superfish plug-in showing how easy it is to turn an HTML unordered list into a flyout menu. The only downside with it is if the menu structure is very big there's … [Read more...] about jQuery Superfish Menus Plug-in and Caching the menu