image selector
The selector :image selects elements of type image, which are images for form submission. The equivalent of $(':image') is $('[type=image]'). Since :image is not part of the CSS specification, for better performance in modern browsers it is better to use [type='image'] instead.
Syntax
This is how we select elements with type image:
$(':image');
Example
Let's select all inputs with type image and give them a green background and a red border using the css method:
<form>
<input type="button" value="button">
<input type="file">
<input type="password">
<button>button</button>
<input type="reset">
<input type="radio" name="test">
<input type="radio" name="test">
<input type="checkbox">
<input type="image">
<input type="text">
</form>
$('input:image').css({background: 'green', border: '2px red solid'});
$('form').submit(function(event) {
event.preventDefault(); // prevents form submission
});