Skip to content

Commit

Permalink
Added data() function to Tag class.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpythoud committed May 18, 2015
1 parent 0c07bdd commit a9ff7fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/org/jcodegen/html/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public T role(final String value) {
return attribute("role", value);
}

public T data(final String name, final String value) {
return attribute("data-" + name, value);
}

public T attribute(final String name) {
element.addAttribute(new BooleanXMLAttribute(name));
return getThis();
Expand Down

0 comments on commit a9ff7fc

Please sign in to comment.