jQuery Tutorial


jQuery Example


jQuery References


jQuery select() Event Reference


  jQuery Events References


Uses

jQuery select() Event Occurs when a text is selected.


Bind a Function to select() event

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

Syntax

$(selector).select(function) 

jQuery select() 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").select(function(){
    $("span").text("Text Selected");
  }); 
});
</script>
Online Try This Code Your Self....   »

Trigger the select() event

Triggering the select() event for a selected elements.

Syntax

$(selector).select()

Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("input").select(function(){
    $("span").text("Text Selected");
  });
  $("button").click(function(){
    $("input").select();
  });  
});
</script>
Online Try This Code Your Self....   »

  jQuery Events References