Firing multiple events onclick with jquery

http://stackoverflow.com/questions/24810515/firing-multiple-events-onclick-with-jquery

by Aaron Kahlhamer

HTML

<input id="test" type="text" name="test" />

JavaScript

var $test = $('#test');

function doSomething() {
    $test.keydown();
    $test.focus();
    $test.change();
    
}

$test.on('click', doSomething);




function doSomethingElse() {
    $('<p>test!</p>').insertAfter('#test');
}

$test.on('keydown', doSomethingElse);