|
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.
|
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.
|
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".
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.
2code
3});
Now both the Libraries can load into different namespaces.
|
Combining persistent server side (ColdFusion) variables with client side (JQuery) values |
I stumbled upon an interested dilemma recently whilst building a search engine. The results of a search are returned, and can be viewed in a list or thumbnail view. The view toggle is a uses a JQuery function, so no persistent data is stored concerning a users current viewing option. The dilemma is how do you maintain the viewing mode across page reloads, such as for pagination, or filtering of the search results?