Space pen content swapping


#1

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?


#2

I think you can do it this way:

@h2 =>
  @text head
  @span content

Kinda like HAML.


#3

@radicaled Thank you … that did the trick