I trying to log childElementCount
property in chrome dev tools but I get undefined.
this is my code:
console.log('childElementCount---', this.ui.tbody.get('childElementCount')
returns childElementCount--- undefined
why is it undefined?
jQuery get()
is for retrieving the underlying DOM element from the jQuery object. It accepts an integer index instead of a string.
Try this.ui.tbody.get(0).childElementCount
or this.ui.tbody.get(0).getAttribute('childElementCount')
or withjQuery:
this.ui.tbody.prop('childElementCount')
or this.ui.tbody.children().length