jquery - Multiple identical rows in a table, how to trigger one onclick event? -
i have rows in table, click event triggered anchor. each row identical, , click event shows div whilst hiding another. how trigger onclick event relating corresponding li on same row?
here jquery i'm using
(function($) { $(document).ready(function() { $('.split-trigger').click(function() { $(this).toggleclass('splittrigger-active'); $('.split').toggleclass('split-active'); }); }); })(jquery);
to apply changes via .click() event, used .siblings() trigger element so:
(function($) { $(document).ready(function() { $('.split-trigger').click(function() { $(this).toggleclass('splittrigger-active'); $(this).siblings('.split').toggleclass('split-active'); }); }); })(jquery);