jQuery focusout() Yöntem
Örnek
<div> öğesi veya herhangi bir alt öğe odağı kaybettiğinde bir <div> öğesinin arka plan rengini ayarlayın:
$("div").focusout(function(){
$(this).css("background-color", "#FFFFFF");
});
Tanım ve Kullanım
Focusout olayı, bir öğe (veya içindeki herhangi bir öğe) odağı kaybettiğinde meydana gelir.
focusout() yöntemi, öğede veya içindeki herhangi bir öğede bir focusout olayı meydana geldiğinde çalışacak bir işlev ekler.
blur() yönteminden farklı olarak , focusout() yöntemi, herhangi bir alt öğe odağı kaybederse de tetiklenir.
İpucu: Bu yöntem genellikle focusin() yöntemiyle birlikte kullanılır.
Sözdizimi
$(selector).focusout(function)
Parameter | Description |
---|---|
function | Optional. Specifies the function to run when the focusout event occurs |