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

Adds refresh method to re-fetch [data-modal] #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

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.

None yet

1 participant