jQuery noSpam email address protector now works with euro domains! (two dots)

Need to show an email address on the web?
You have a few options:

1) create a standard "mailto:" link and enjoy an endless flow of vi@gR&! ads and invitiations for massive funds transfers from far away lands

2) use an email obfuscator!

My favorite email address obfuscator by far is the jQuery noSpam plugin by Mike Branski.
This jQuery plugin turns an obfuscated e-mail address into a human-readable one.

Now supports multiple dots (.) both before and after the at (@) sign!

While the simplicity and smoothness of this little script has always been top-notch, it has just been made even better by allowing the use of euro-style domains, such as " user@domain.co.uk " in addition to standard 'single dot' extensions.

To use this plugin, include jquery.nospam.js and call the nospam() method. No Spam automatically detects if your matched element is a link. If so, it checks the rel attributes for the obfuscated e-mail addresses. For all other elements, it uses the text between the matched tags. 

Examples and further instructions are at http://www.leftrightdesigns.com/library/jquery/nospam/

 

jQuery : find empty select boxes (or selects with a specific value)

Another super short jQuery solution to a super long late-night quest on my part.

I have a form with a variable number of select boxes. Before the form can be submitted, I need to verify that there are no selections left unchanged.

The select boxes start out with a default value of ''  (empty quotes). To search for them , i was using all sorts of variations on jquery 'val()', but that is more useful for setting a value than finding a select with a value. After a few various connotations... here's the one that works:

 var valCt = $('select.colorselect[value=""]').size();

This finds all selects with the class of 'colorselect' and the value of '', and returns the size, which in jQuery talk means 'how many'. If I have 3 unchanged select boxes, valCt will equal '3'.

From there it is an easy hop to add a check to the submit action of my form, checking to make sure valCt is 0.

if (!(valCt == 0)) {
return false
} else [ ... submit form here ... ]

Adding Twitter Tweetbacks to BlogCFC - find out if your posts get tweeted!

Thanks very much to Rey Bango for the excellent, easy BlogCFC instructions, and to Dan Zarella for the javascript that makes it go.

The post with full 'how to' is here, on Rey's site:
http://www.reybango.com/index.cfm/2009/1/20/Adding-TweetBacks-to-BlogCFC

I just love the cf community... and twitter!

== == ==

UPDATE:

The new improved version is here:
http://www.reybango.com/index.cfm/2009/1/23/TweetBacks--BlogCFC--A-BIG-Update-Major-Speed-Improvement

Thanks also to Adam Tuttle for the cool sweettweets cfc!

 

 

Mobile jQuery Cheat Sheet

http://colorcharge.com/jquery/

made for iPhone/iTouch but works great on my blackberry in Opera mobile. Unlike most of the things I bookmark on my mobile, I can actually see using this one.

here's the actual URL, click this link in your mobile browser:
http://labs.colorcharge.com/jtouch/

jQuery in Action 2008 Best Seller (no surprise!)

Manning Publications' jQuery in Action is the book to have if you want to learn jQuery, or if you're a somewhat-jQ-ninja-in-training-ish , and you want to unlock more hidden gems of jQuery wisdom.

I grabbed my copy in advance of the release date last year, and have worn out some of the best pages already.  No surprise to me, Manning just announced that jQuery in Action was their 2008 best seller!

Incidentally , they are running a hefty discount on this and any other titles , for another week or so.

(from the same email announcing the best seller list, in just now... )

Save 31% on any purchase at Manning.com
Enter coupon code ja1331 when you check out
$20 minimum purchase; expires January 13, 2009

Cartweaver Option Selection Fix ( select list javascript )

A small but persistent issue with the default Cartweaver product selection script shows up when a product has more than one set of options. For example, you have skus with a range of colors and a range of sizes.

I finally took a few minutes to create a fix, which was actually quite simple to implement. And in the interest of keeping it non-denominational, I didn't even use jQuery... just plain 'ol javascript that can easily be added to any existing CW site.

more...

Show/Hide the Cartweaver "forgot password" form with jQuery

Here's a perfect example of the way jQuery makes things so easy, even a caveman programmer can do it.

In Cartweaver, the default Customer Login form is actually two separate forms - one to log in, and one to recall a forgotten password by entering an email address.

I have tried various rearrangements of the default markup on this page for each site I've done, always trying to give the more important 'log in' form a more visible presence than the 'forgot pw' form, without cluttering up the page.

Tonight, i found a solution i like best of all ... hide the forgot pw form altogether, using a simple link to show it if needed.

more...

ColdFusion jQuery Cycle Slideshow Custom Tag

I was putting together yet another slick little jQuery Cycle slideshow tonight, and decided to make it dynamic.

I wanted a solution that would take a folder full of images, size them to a given max width and height, and set up the cycle slideshow, all on the fly, while keeping it easy to slide another image or two in any time, or tweak the cycle slideshow settings.

more...

ColdFusion Contact Form in One Easy File - Part 3 of 3 at Community MX

http://www.communitymx.com/abstract.cfm?cid=B895B

And with this the mini-series is complete.
The third and final section of this tutorial includes adding jQuery validation, cleaning up and compacting the code, and making it as easy as could be to drop the file into any site for an instant, dynamic, spam-blocking ColdFusion form-to-email contact form.

p.s. - CMX has put up part 2 and 3 as paid articles (part 1 is free), but you can get a free trial and grab this along with some other good information - If you haven't spent time on Community MX lately , check it out - they have a lot going on!

jQuery automatic anchor links with 'each()'

A client gave me a long page of addresses and links, a directory of manufacturers for his industrial-based site.

Converting it to html, my markup ended up something like this:


<h1>Links Directory</h1>
<h2>Alabama</h2>
<p><strong>Company Name</strong><br />
Address<br />
Phone... etc
</p>
<p><strong>Company Name</strong><br />
Address<br />
Phone... etc
</p>
<h2>Arkansas</h2>
<p><strong>Company Name</strong><br />
Address<br />
Phone... etc
</p>
<p><strong>Company Name</strong><br />
Address<br />
Phone... etc
</p>

and so on for the various states, about 35 of 'em.

Now, I needed a list of links at the top of the page, one for each state, that would allow the user to click a state name at the top, and get scrolled down to the relevant section below.

I had two choices.. go through the code and manually make an anchor link, or come up with a dynamic solution (not a hard decision).

more...

Add a CSS link to your document head with jQuery

Found this little snippet for adding a css file <link> tag to the head of your page with jQuery.

Presumably you could use it for other things too.

$(document).ready(function() {
    $('head', document).append('<link rel="stylesheet" type="text/css"
media="screen" href="css/mysite.css" />');
   });

Like CFHtmlHead, for javascript!

More Entries

blogcfc 5.9.1.002 by raymond camden
contact michael evangelista