0

I want to trigger click on "Add Another item" button of field collection on some jQuery event.

closed as off-topic by AjitS, DRUPWAY, Adrian Cid Almaguer, mradcliffe, Beebee Nov 2 '17 at 11:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on programming, PHP, SQL, etc. that do not relate directly to Drupal are off-topic here, but can be asked on Stack Overflow." – AjitS, DRUPWAY, Adrian Cid Almaguer, mradcliffe, Beebee
If this question can be reworded to fit the rules in the help center, please edit the question.

1
jQuery('.field-add-more-submit').mousedown();

works in Inspector.

$('.field-add-more-submit').mousedown();

probably works from a module.

.click() doesn't work for some reason. More info here.

Not the answer you're looking for? Browse other questions tagged or ask your own question.