Created
July 7, 2015 04:18
-
-
Save srinathweb/88765ac5a3a79ca548d2 to your computer and use it in GitHub Desktop.
table to list
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
| $(document).ready(function() { | |
| var ul = $("<ul>"); | |
| $("table tr").each(function(){ | |
| var li = $("<li>") | |
| $("th, td", this).each(function(){ | |
| var p = $("<p>").html(this.innerHTML); | |
| li.append(p); | |
| }); | |
| ul.append(li); | |
| }) | |
| $("table").replaceWith(ul); | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if(window.innerWidth <= 800 && window.innerHeight <= 600) {