jQuery Tutorial


jQuery Example


jQuery References


jQuery keyup() Event Reference


  jQuery Events References


Uses

jQuery keyup() event occurs when key is released.


Bind a Function to keyup() event

Defined function run when the keyup() event occurs on the selected elements.

Syntax

$(selector).keyup(function) 

jQuery keyup() events supported following parameters.

ParameterDescription
functionFunction is Optional parameter. Function define the ready to run when event occur.

Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("input").keydown(function(){
    $("input").css("background-color","#FFFF99");
  });
  $("input").keyup(function(){
    $("input").css("background-color","pink");
  });
});
</script>
Online Try This Code Your Self....   »

Trigger the keyup() event

Triggering the keyup() event for a selected elements.

Syntax

$(selector).keyup()

Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("input").keydown(function(){
    $("input").css("background-color","#FFFF99");
  });
  $("input").keyup(function(){
    $("input").css("background-color","pink");
  });
  $("#btn1").click(function(){
    $("input").keydown();
  });  
  $("#btn2").click(function(){
    $("input").keyup();
  });  
});
</script>
Online Try This Code Your Self....   »

  jQuery Events References