Want to close a popup window when user clicks on hyperlink? Use the following examples:
Example 1 The data-* attribute is defined independent of the class attributes.
1 | <a class="popmake-close pum-close" href="http://www.website.com" target="_blank" rel="noopener noreferrer" data-do-default="true">Link Text</a> |
Example 2 The HTML in Example 1 could instead be written with the data-* attribute added as a class.
1 | <a class="popmake-close pum-close do-default" href="http://www.website.com" target="_blank" rel="noopener noreferrer">Link Text</a> |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.