jQuery .select() event

Syntax and Description


.select(handler)          
.select()

handler is a function to execute each time the event is triggered. Return value is the jQuery object, for chaining purposes.

select method binds an event handler to the select JavaScript event, or trigger that event on an element.

.select(handler) is a shortcut for .bind('select', handler). .select() is a shortcut for .trigger('select').

We can trigger the event manually when another element is clicked.


$('#other').click(function() {
    $('#target').select();
});




















Home »
  jQuery »
    jQuery Tutorial »




Basics
Selector
DOM
Event
Effect
Utilities