Ja estou com dificuldade faz uns dois dias e não consigo sair deste passo. Com isso, não consigo pegar a propriedade text dos tds. Me ajuda por favor?
ao digitar
$("tbody>tr")
no console do chrome, recebo a seguinte resposta:
jQuery.fn.init [tr, prevObject: jQuery.fn.init(1)]
Que ao clicar para expandir, não expande nos dados da linha, e sim expande em:
0: tr
length: 1
prevObject: jQuery.fn.init [document]
__proto__: Object(0)
Com diversas propriedades dentro:
0: tr
accessKey: ""
align: ""
assignedSlot: null
attributeStyleMap: StylePropertyMap {size: 0}
attributes: NamedNodeMap {length: 0}
autocapitalize: ""
baseURI: "http://localhost:3000/principal.html"
bgColor: ""
cells: HTMLCollection(3) [td, td, td]
ch: ""
chOff: ""
childElementCount: 3
childNodes: NodeList(7) [text, td, text, td, text, td, text]
children: HTMLCollection(3) [td, td, td]
classList: DOMTokenList [value: ""]
className: ""
clientHeight: 0
clientLeft: 0
clientTop: 0
clientWidth: 0
contentEditable: "inherit"
dataset: DOMStringMap {}
dir: ""
draggable: false
firstChild: text
firstElementChild: td
hidden: false
id: ""
innerHTML: "↵ <td>Giacomo</td>↵ <td>10</td>↵ <td>↵ <a href="#" class="botao-remover">↵ <i class="small material-icons">delete</i>↵ </a>↵ </td>↵ "
innerText: "↵ Giacomo↵ 10↵ ↵ ↵ delete↵ ↵ ↵ "
inputMode: ""
isConnected: true
isContentEditable: false
lang: ""
lastChild: text
lastElementChild: td
localName: "tr"
namespaceURI: "http://www.w3.org/1999/xhtml"
nextElementSibling: null
nextSibling: text
nodeName: "TR"
nodeType: 1
nodeValue: null
nonce: ""
offsetHeight: 0
offsetLeft: 0
offsetParent: null
offsetTop: 0
offsetWidth: 0
onabort: null
onauxclick: null
onbeforecopy: null
onbeforecut: null
onbeforepaste: null
onblur: null
oncancel: null
oncanplay: null
oncanplaythrough: null
onchange: null
onclick: null
onclose: null
oncontextmenu: null
oncopy: null
oncuechange: null
oncut: null
ondblclick: null
ondrag: null
ondragend: null
ondragenter: null
ondragleave: null
ondragover: null
ondragstart: null
ondrop: null
ondurationchange: null
onemptied: null
onended: null
onerror: null
onfocus: null
onfullscreenchange: null
onfullscreenerror: null
ongotpointercapture: null
oninput: null
oninvalid: null
onkeydown: null
onkeypress: null
onkeyup: null
onload: null
onloadeddata: null
onloadedmetadata: null
onloadstart: null
onlostpointercapture: null
onmousedown: null
onmouseenter: null
onmouseleave: null
onmousemove: null
onmouseout: null
onmouseover: null
onmouseup: null
onmousewheel: null
onpaste: null
onpause: null
onplay: null
onplaying: null
onpointercancel: null
onpointerdown: null
onpointerenter: null
onpointerleave: null
onpointermove: null
onpointerout: null
onpointerover: null
onpointerup: null
onprogress: null
onratechange: null
onreset: null
onresize: null
onscroll: null
onsearch: null
onseeked: null
onseeking: null
onselect: null
onselectionchange: null
onselectstart: null
onstalled: null
onsubmit: null
onsuspend: null
ontimeupdate: null
ontoggle: null
onvolumechange: null
onwaiting: null
onwebkitfullscreenchange: null
onwebkitfullscreenerror: null
onwheel: null
outerHTML: "<tr>↵ <td>Giacomo</td>↵ <td>10</td>↵ <td>↵ <a href="#" class="botao-remover">↵ <i class="small material-icons">delete</i>↵ </a>↵ </td>↵ </tr>"
outerText: "↵ Giacomo↵ 10↵ ↵ ↵ delete↵ ↵ ↵ "
ownerDocument: document
parentElement: tbody
parentNode: tbody
part: DOMTokenList [value: ""]
prefix: null
previousElementSibling: null
previousSibling: text
rowIndex: 1
scrollHeight: 0
scrollLeft: 0
scrollTop: 0
scrollWidth: 0
sectionRowIndex: 0
shadowRoot: null
slot: ""
spellcheck: true
style: CSSStyleDeclaration {alignContent: "", alignItems: "", alignSelf: "", alignmentBaseline: "", all: "", …}
tabIndex: -1
tagName: "TR"
textContent: "↵ Giacomo↵ 10↵ ↵ ↵ delete↵ ↵ ↵ "
title: ""
translate: true
vAlign: ""