tipsy / j2html

Java to HTML generator. Enjoy typesafe HTML generation.

Home Page:https://j2html.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shorthand id/class notation

tipsy opened this issue · comments

commented

Looking into creating a shorthand for adding id/class to elements. Current suggestion:

table($("#my-table.table"),
    tbody(
        tr($(".table-row"), 
            td()
        )
    )
)
<table id="my-table" class="table">
   <tbody>
        <tr class="table-row">
            <td></td>
        </tr>
    </tbody>
</table>
commented

Also looking at

table(attrs("#my-table.table"),
    tbody(
        tr($(".table-row"), 
            td()
        )
    )
)

Proposed in #56