Skip to content

Instantly share code, notes, and snippets.

@glinesbdev
Created July 22, 2014 00:25
Show Gist options
  • Save glinesbdev/31227a74e39fd9f6251e to your computer and use it in GitHub Desktop.
Save glinesbdev/31227a74e39fd9f6251e to your computer and use it in GitHub Desktop.
Wanted to write some pure JS to mimic a simple jQuery
var hideStuff = function() {
if (#{@platform.platform_type == 'rewards'}) {
var row = document.getElementsByTagName("tr");
for (var i = 0; i < row.length; i++) {
if (row[i].innerHTML.search("Accreditation") != -1) {
row[i].style.display = "none";
} else if (row[i].innerHTML.search("Escrow") != -1) {
row[i].style.display = "none";
}
}
}
}
hideStuff();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment