• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Checkbox Groups (gallery-checkboxgroups) on cdn

    Last Updated: 04/17/13
    + 1 -

    John Lindal

    YUI Contributor

    See 50 more by this user.

    Created: 12/4/09
    Last CDN Push: 05/16/12
    Build Tag: gallery-2012.05.16-20-37
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.5.1
    Free for use.

    The available behaviors are:

    • At least one checkbox must be selected. Implements the drop-of-mercury behavior.
    • At most one checkbox must be selected. This is not the same as radio buttons, since a radio button cannot be deselected.
    • Select All checkbox as a secondary control for the state of the rest of the checkboxes in the group.
    • Enable/disable a set of nodes based on the state of a set of checkboxes.

    More information is provided in the YUI Blog post: http://www.yuiblog.com/blog/2010/03/01/gallery-checkbox-group/

    • Tags:
    • checkbox
    • jafl
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Attaches behaviors to groups of checkboxes.

    Code Sample

    <script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2012.05.16-20-37'
    }).use('gallery-checkboxgroups', function(Y)
    {
    	// attaches behavior to all checkboxes with CSS class "my-at-least-one-checkbox-group"
    	new Y.AtLeastOneCheckboxGroup('.my-at-least-one-checkbox-group');
     
    	// attaches behavior to all checkboxes with CSS class "my-at-most-one-checkbox-group"
    	new Y.AtMostOneCheckboxGroup('.my-at-most-one-checkbox-group');
     
    	// attaches behavior to all checkboxes with CSS class "my-select-all-checkbox-group",
    	// controlled by the checkbox with id "my-select-all-checkbox"
    	new Y.SelectAllCheckboxGroup('#my-select-all-checkbox', '.my-select-all-checkbox-group');
     
    	// attaches behavior to all checkboxes with CSS class "my-enable-if-any-checkbox-group",
    	// to enable/disable all nodes with CSS class "managed" (typically buttons)
    	new Y.EnableIfAnyCheckboxGroup('.my-enable-if-any-checkbox-group', '.managed');
    });

    Forum Posts

    Subject Author Date
    Blog article on CheckBox Groups Eric Miraglia 03/2/10

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info