Skip to content

Commit

Permalink
added some documentation + removed consol.log
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrodevog committed Nov 2, 2023
1 parent bd7c87a commit 96a5a6d
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,19 @@
});
function hide(e) {
var $this = $(this);
const $this = $(this);
var selector = $this[0].className.split(' ')[1]
const selector = $this[0].className.split(' ')[1]
let elements = Array.from(document.getElementsByClassName(selector));
elements.shift();
elements.shift(); // Remove first element (checkbox)
elements.forEach((element) => {
let row = $(element).parents('div').first();
if (row.hasClass('hide')) {
// console.log($(element).parents('row'));
$(element).parents('div').first().removeClass('hide');
row.removeClass('hide');
} else {
$(element).parents('div').first().addClass('hide');
row.addClass('hide');
}
});
console.log($(elements[0]).parents('div'))
console.log($this[0].className.split(' ')[1]);
}
</script>
{% endblock %}

0 comments on commit 96a5a6d

Please sign in to comment.