Sasu Sasu - 9 months ago 47
jQuery Question

Trigger an event created by .on()

I have a jQuery event defined as follows :

$('#pagebody').on('click', '#serverCompTab', function () {
toggleTabs('#serverComp', '#serverCompTab');

I would like to trigger this event manually on my code like

Can anyone help me with this?


You were really close. $('#serverCompTab').click() should take care of it for you.