jQuery and append without adding space

Viewed 9077

I have the code:

<div class="message">
    <span>Menu 1</span><span>Menu 2</span>
</div>

Note: between the span tags don't have spaces. If I use:

$('.message').append('<span>Menu 3</span>');

The append adds a space in the line. Is there any other way to put a tag without having to add space?

I need the jquery generates a code like this:

<div class="message">
    <span>Menu 1</span><span>Menu 2</span><span>Menu 3</span>
</div>

Thank you.

5 Answers
Related