Created
May 26, 2014 10:18
-
-
Save Kcko/132c4b7ab9ba1f1a65a2 to your computer and use it in GitHub Desktop.
Responsive tables (add cell description -- data attribute)
This file contains 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
function pridatPopisky(el) { | |
var popisky = el.getElementsByTagName("th"); | |
var radky = el.getElementsByTagName("tr"); | |
for (var i = 1; i < radky.length; i++) { | |
var bunky = radky[i].getElementsByTagName("td"); | |
for (var j = 0; j < bunky.length; j++) { | |
bunky[j].setAttribute("popisek", $(popisky[j]).html()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment