This javascript function hides all the labels in the document, that have a rel attribute:
<script type="text/javascript">
function hide_labels()
{
var arr = document.getElementsByTagName("label");
var arr2 = [];
for (i = 0; i < arr.length; i++) {
if(arr[i].hasAttribute("rel"))
arr2.push(arr[i]);
}
//console.log(arr2);
for (i = 0; i < arr2.length; i++) {
arr2[i].setAttribute('style', 'display:none;');
}
}
</script>
<script type="text/javascript">
function hide_labels()
{
var arr = document.getElementsByTagName("label");
var arr2 = [];
for (i = 0; i < arr.length; i++) {
if(arr[i].hasAttribute("rel"))
arr2.push(arr[i]);
}
//console.log(arr2);
for (i = 0; i < arr2.length; i++) {
arr2[i].setAttribute('style', 'display:none;');
}
}
</script>
Comments
Post a Comment