Return to Snippet

Revision: 9890
at November 28, 2008 05:09 by ianmonge


Initial Code
Selectors.Pseudo.checked = function(){  
	return (this.get('tag') == 'input' && (this.get('type').toLowerCase() == 'radio' || this.get('type').toLowerCase() == 'checkbox') && this.checked);  
};

Initial URL
http://davidwalsh.name/checked-pseudo-selector-mootools

Initial Description
How to create a custom “:checked” pseudo selector for use in MooTools. It is just a small snippet but I’ve found it incredibly useful.

Initial Title
Create a Custom “:checked” Pseudo Selector for MooTools 1.2

Initial Tags
javascript

Initial Language
JavaScript