Space pen content swapping


I am trying to create markup of the form

<h2>head value<span>content value</span></h2>

So i am using the following

add_content: (head, content) ->
        @append $$ ->
            @h2 head, =>
                @span content

But this creates

<h2><span>content value</span>head value</h2>

Any help?


I think you can do it this way:

@h2 =>
  @text head
  @span content

Kinda like HAML.


@radicaled Thank you … that did the trick