jquery - How to find <tr> inside <table> with depth 1? -


  $ (यह) .parents ('table: first')। Find ('tr'))   

उपर्युक्त tr अंदर तालिका के लिए खोज करेगा, यह केवल शीर्ष tr के लिए खोज कैसे करे

संपादित करें

बच्चों अपेक्षित रूप से काम नहीं कर रहा है:

  चेतावनी ($ (यह '):। (' तालिका ': पहले)। बच्चों (' tr ')। लंबाई)  

देता है 0

  $ (this) .parents ('तालिका: प्रथम')। ('& Gt; टॉडी & gt; tr; & gt; ट्र') ढूंढें  

मेज को पकड़ लेंगे और फिर सभी टीआर मिलेंगे जो कि सीधा बच्चे हैं और उन टीआर की मेज के प्रत्यक्ष बच्चों हैं।

दोनों मामलों में काम करना चाहिए जहां ब्राउज़र जोड़ता है और जब ब्राउज़र

नहीं करता है

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -