I have a problem with the this
element (I know how this
is working).
I have a lot of that html structure. When I click on the a button, the
Change your code so that you get the extra options div directly after the clicked link like this:
buttonSubmit.click(function (e) {
e.preventDefault();
// Get the extra options directly after the clicked link
var extraOptions = $(this).closest('p.actions').next('div.extra-options-tickets');
if(extraOptions.is(":visible")) {
extraOptions.hide();
} else {
extraOptions.fadeIn(450);
};
});