Sasu Sasu - 1 year ago 75
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?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download