Text form in $('span.text'). text();

Asked

Viewed 144 times

0

I would like to format text in the following line:

$('span.texto').text('Enviamos um email para email@email');

I’d like you to stay:

We send an email to email

I tried to

$('span.texto').text('Enviamos um email para <b>email@email</b');

But it hasn’t yet

1 answer

1


Exchange the text for html:

$('span.texto').html('Enviamos um email para <b>email@email</b');
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span class="texto"></span>

  • 1

    That’s right, gave it right! Thank you very much!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.