How To Customize The Close Button Title

OptinMonster is highly customizable, and with a little effort, allows you to customize the title on the close button.

If you want to change the text “Close” that appears when you hover on the close button on the Optin, you can do that by following this guide.

close button title

It is helpful when you are running a multi-lingual website and want the title text to appear in your own language.

To get started you will need to have Unique Optin Slug & Template Namespace handy.

You can easily find your Optin Slug in your OptinMonster Dashboard under the Optin name or by clicking the arrow besides the Edit button.

Get-Slug-for-Your-Particular-Optin

Sample Javascript to customize the Close Button Title:

<script type="text/javascript" id="customize-om-close-title-attr">
    jQuery(function ($) {
        $(document).ready(function ($) {
            $(document).on('OptinMonsterLoaded', function( event, data, object ) {
                $('#om-slug .namespace-close').attr('title', 'Custom Title Text Here');
            });
        });
    });
</script>

You will need to modify om-slug and namespace in the above script before adding it to your website.

So if your Optin Slug is qjqghznasusue0qf and Template Namespace is houston then the correct Javascript will be :

<script type="text/javascript" id="customize-om-close-title-attr">
    jQuery(function ($) {
        $(document).ready(function ($) {
            $(document).on('OptinMonsterLoaded', function( event, data, object ) {
                $('#om-qjqghznasusue0qf .houston-close').attr('title', 'Custom Title Text Here');
            });
        });
    });
</script>

Final Result

close button title live

You can follow our guide if you need help in adding Javascript to your WordPress website.