Skip to content
This repository was archived by the owner on Oct 16, 2023. It is now read-only.

Conversation

@zackkatz
Copy link

@zackkatz zackkatz commented Jul 18, 2018

See #6 for more information.

I know this isn't the best solution, but I'm not a great JS developer.

Another alternative would be to add something like this:

/**
 * @param {Element} item
 */
ARIAmodal.addModal = function ( item ) {
	modal.push( item );	
};

and then refactor setupModal so it runs only on one modal at a time, then add a new setupModals method that would loop through all the items in the modal array and run setupModal on them.

Again, I'm not great at JS. Thank you for the script, and please let me know if I can help with the PR.

Closes #6

zackkatz added 2 commits July 17, 2018 19:17
See scottaohara#6 for more information.

I know this isn't the best solution, but I'm not a great JS developer.

Another alternative would be to add something like this:

```
/**
	 * @param {Element} item
	 */
	ARIAmodal.addModal = function ( item ) {
		modal.push( item );	
	};
```

and then refactor `setupModal` so it runs only on one modal at a time, then add a new `setupModals` method that would loop through all the items in the `modal` array and run `setupModal` on them.

Again, I'm not great at JS. Thank you for the script, and please let me know if I can help with the PR.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant