github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

bentlegen / labelize

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 6
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • gh-pages
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

jQuery plugin for giving container elements label-like properties — Read more

  cancel

http://bentlegen.github.com/labelize/demo

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Small tweak to demo link in README 
bentlegen (author)
Sun Jan 24 12:37:00 -0800 2010
commit  fce2440b81c99f5249a4fbe836138d0d189edf0d
tree    1117586a3be7141d06938320caab9ffa86b82d61
parent  7e134251a92e63e42bc3a05b257d3081b52d3fe8
labelize /
name age
history
message
file LICENSE Loading commit data...
file README.textile
directory demo/
file jquery.labelize.js
README.textile

Labelize

Labelize is a jQuery plugin that lets you give arbitrary container elements <label/>-like properties, and smooth over click/change event compatibility between browsers.

Features

  • Works with any input element (radio buttons, text inputs, etc.)
  • Preserves click() and change() events between browsers
  • Optional: specify onhover class

Demo

http://bentlegen.github.com/labelize/demo

Usage

Simple case

Container div wrapping a checkbox.

<div class="myLabel">
  <input type="checkbox">Enabled
</div>
<script>
  // Clicking anywhere on the "myLabel" div checks/unchecks
  // the contained checkbox
  
  $('.myLabel').labelize();
</script>

With label hover effect

Because IE6 doesn’t support the :hover css command for div elements, Labelize lets you define a hoverClass that is applied on label hover:

<script>
  $('.myLabel').labelize('hoverClass');
</script>

License

MIT License. See LICENSE for more information.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server