Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buttonText1 doesnt work #10

Open
salime45 opened this issue Sep 5, 2019 · 5 comments
Open

buttonText1 doesnt work #10

salime45 opened this issue Sep 5, 2019 · 5 comments

Comments

@salime45
Copy link

salime45 commented Sep 5, 2019

I have this configuration, but i dont see any changes

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mailtoui-min.js" data-options='{ "buttonText2": "Outlook";"buttonText1": "Gmail" }' defer></script>
@mariordev
Copy link
Owner

mariordev commented Sep 5, 2019

You have the wrong syntax in the options object. You must separate each key:value pair with a comma instead of a semi-colon. Change it to this and it will work:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mailtoui-min.js" data-options='{ "buttonText2": "Outlook", "buttonText1": "Gmail" }' defer></script>

@salime45
Copy link
Author

salime45 commented Sep 6, 2019

I changed but still doesnt work, i am using this in wordpress.

@mariordev
Copy link
Owner

Are you getting any kind of error in the console? What does your mailto link look like? Did you add the mailtoui class to the <a> tag?

@mariordev mariordev reopened this Sep 6, 2019
@salime45
Copy link
Author

salime45 commented Sep 7, 2019

this is my link

<a class="mailtoui" href="mailto:[email protected]">[email protected]</a>

The window opens and i can customize the CSS but the data-options doesnt work

@mariordev
Copy link
Owner

@salime45 I wonder if WP or a WP plug in is the cause of this. The data-options attribute has worked in every environment I tested in. I'll have to look further into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants