1

So I cannot just add a mail to :

.SPA-notRight:after {
    content: 'contact us: me@email.com';
    visibility: visible;
    display: block;
}
<div class="SPA-notRight">
<p>Something not right?</p>

hyperlink to this css code. IS there a way to make this go to a hyperlink or an email?

Vzupo
  • 1,388
  • 1
  • 15
  • 34

1 Answers1

1

In CSS it is not possible. after is a pseudo element and therefore not part of the actual DOM.

However, since your question is tagged with jQuery as well, why not just append the email to your div?

$(document).ready(function(){
    $(".SPA-notRight").append('Contact us: <a href="mailto:me@email.com">me@email.com</a>');
});

Demo:

$(document).ready(function(){
    $(".SPA-notRight").append('Contact us: <a href="mailto:me@email.com">me@email.com</a>');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<div class="SPA-notRight">
    <p>Something not right?</p>
</div>
NullDev
  • 6,739
  • 4
  • 30
  • 54