Last active
August 29, 2015 14:07
-
-
Save jayapal/711224a1a538be4447cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// js where you add header for the table dynamically | |
field = "user_type" | |
field_split = field.split("_") | |
field_text = field_split.join(" ") | |
console.log(field_text) // user type | |
var th = $('<th>', { | |
text : field_text, | |
class: "text-capitalize", | |
}) | |
// css | |
.text-capitalize { | |
text-transform:capitalize; | |
} | |
So when u render, <th class="text-capitalize"> user type </th> | |
and in browser, you can see as User Type. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment