Shaun Mccran

My digital playground

16
M
A
R
2010

Validating checkboxes using the JQuery validate plug-in

I have recently spent some time building a dynamic XML driven form generator. The last element of this was the checkbox form element. All my other fields were being validated as either required, or needing a certain length using the JQuery Validation plug-in. ( http://jquery.bassistance.de/validate/)

This article explains how I put together a checkbox validation routine using the Validate plug-in.

[ More ]

15
M
A
R
2010

Using other plug-ins with the JQuery Carousel Plug-in and event issues

This entry examines how the JQuery Carousel object interacts with other Plug-ins, and how to combine those plug-ins with the Carousel functionality. I also cover an issue where the jCarousel plug-in does not apply functionality to non visible elements when the page loads.

[ More ]

12
M
A
R
2010

Integrating Google search into your site using ColdFusion and XML

Rather than writing a custom search, and indexing service for your sites you can use Google to do the leg work for you.

This article examines how you can create and integrate a Google site search into your site. We will query Google and return an XML packet, which we will translate and display within our sites framework.

[ More ]

11
M
A
R
2010

JavaScript Library conflicts when using more than one at the same time

Whilst building a new piece of functionality I have been trying to combine a JQuery carousel plug-in and the lightview prototype plug-in. This threw up an unexpected issue. Both libraries map the dollar ($) as their shortcut indicator. JQuery uses "$" as a shortcut as a replacement for "jQuery" and Prototype uses "$" as well.

It turns out that there is a JQuery command for exactly this issue. Wherever you include the JQuery library reference add another script code. The noConflict function maps which character you tell it as the short name for "JQuery".

view plain print about
1<s/cript src="http://www.google.com/jsapi" type="text/javascript"></script>
2<s/cript type="text/javascript" charset="utf-8">
3    google.load("jquery", "1.3");
4</script>
5
6<s/cript>
7    jQuery.noConflict();
8    var J = jQuery;
9</script>

Just remember to change your references to JQuery from "$" to "J", or whatever you assign it to.

view plain print about
1J(document).ready(function(){
2code
3});

Now both the Libraries can load into different namespaces.

_UNKNOWNTRANSLATION_ /