:image Seçicisi

image selector
Açıklama : Tüm image tipi elemanlarını seçer.

jQuery( ":image" ) Eklendiği Versiyon 1.0

:image ve [type="image"] seçicileri aynı işi yapar.


İlave notlar :

  • Bu :image seçicisi bir jQuery eklentisi olup standart CSS seçicisi olmadığı için JavaScript querySelectorAll() metodu kadar performanslı olmaz. Modern tarayıcılarda daha iyi performans için [type="image"] kullanınız.


Örnekler:

Tüm image input elemanları bul.

<style>
   textarea { height: 45px; }
</style>
<form>
  <input type="button" value="Input Button">
  <input type="checkbox"><input type="file">
  <input type="hidden"><input type="image">
  <input type="password"><input type="radio">
  <input type="reset"><input type="submit">
  <input type="text">
  <select>
    <option>Option</option>
  </select>
  <textarea></textarea>
  <button>Button</button>
</form>
<div></div>
<script>
   var input = $("input:image").css( {
      background:"yellow",
      border:"3px red solid"
   });
   $("div")
      .text( "For this type jQuery found " + input.length + "." )
      .css( "color", "red" );
   $("form").on("submit", function( event ) {
      event.preventDefault();
   });
</script>

.

.