0.5.3 • Published 7 years ago

imgcheckbox v0.5.3

Weekly downloads
46
License
GPL-2.0
Repository
github
Last release
7 years ago

Description

imgCheckbox is a jQuery plugin that makes img tags checkable (much like Google's recaptcha image selection tool). See it in action on the demo page: http://jcuenod.github.io/imgCheckbox/

Usage

You can call imgCheckbox without any parameters on any jQuery collection containing <img> elements.

$("img.checkable").imgCheckbox();

You can have multiple sets of imgCheckboxes with different parameters.

$("img.checkableGroup1").imgCheckbox();
$("img.checkableGroup2").imgCheckbox({ "graySelected": false });

Options

Methods

Events

Event callbacks are accessible via the options object. Use the syntax:

$("img").imgCheckbox({
    onload: function(){
      // Do something fantastic!
    }
});

Advanced

You can add any custom styles using the styles option. For example, to add a blur filter to selected images:

$("img").imgCheckbox({
	"styles": {
		"span.imgCheckbox.imgChked img": {
			// This property will overwrite the default grayscaling, we need to add it back in
			"filter": "blur(5px) grayscale(50%)",

			// This is just css: remember compatibility
			"-webkit-filter": "blur(5px) grayscale(50%)",

			// Let's change the amount of scaling from the default of "0.8"
			"transform": "scale(0.9)"
		}
	}
});

Compatibility

  • Firefox
  • Chrome
  • Opera
  • IE8+ (untested on prior versions)
0.5.3

7 years ago

0.5.2

8 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.6

9 years ago

0.4.5

9 years ago

0.4.4

9 years ago

0.4.3

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.7

9 years ago

0.3.6

9 years ago

0.3.5

9 years ago