Category Archives: JavaScript

jQuery: First (Matching) Sibling

I wanted to select the next sibling element after the current one for an event handler, using jQuery. The desired behavior is to be able to click a heading (<h3>, in this case) and locate the very next <div>, <ol>, … Continue reading

Posted in jQuery | Tagged , , , | Comments Off

Multiple jQueryUI Themerolled Themes inside ASP.Net App_Themes

One of the things I love about jQueryUI is the fact that it can generate a download based upon one of several great-looking themes. This rolls up all the images and CSS into a single zip along with a customized … Continue reading

Posted in ASP.Net, jQueryUI | Tagged , , , , | Comments Off

jQuery Detector Overkill

With the ideas, help, and suggestions of some very smart folks, I’ve been able to put together a userscript that displays whether jQuery is used on the current page—along with version—and can also load jQuery into the current page by … Continue reading

Posted in JavaScript, jQuery, userscripts | Tagged , , | 1 Comment

Email Validation RegExp

I had to search my desktop files and email history for forty minutes before I turned this up: var rfc2822 = /^[\w!#$%&’*+/=?^`{|}~-]+(?:\.[\w!#$%&’*+/=?^`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])*)+\.(?:[a-z]{2,4}|museum|travel)$/i; That’s a JavaScript variable declaration, but the RegExp is valid for Perl and can be quickly translated for … Continue reading

Posted in JavaScript, Regular Expressions | 1 Comment