Example 2

JQuery Dom Selector Plugin Sample

JS code

$("img").domSelector({
	mode : 'toggle',
	selectedClass : 'highlighted'
});
	

HTML code

<img src="http://lorempixel.com/100/100" alt="">
<img src="http://lorempixel.com/100/100" alt="">
		.
		.
		.
<img src="http://lorempixel.com/100/100" alt="">
<img src="http://lorempixel.com/100/100" alt="">
				

CSS code

img {
	opacity: 0.5;
	transition: all 500ms;
	-moz-transition: all 500ms; /* Firefox 4 */
	-webkit-transition: all 500ms; /* Safari and Chrome */
	-o-transition: all 500ms; /* Opera */
}

.highlighted {
	border: 1px solid red;
	opacity: 1;
}