0

I have a table like this, from this site Flipkart.com

<table cellspacing="0" class="specTable">
<tr><th class="groupHead" colspan="2">GENERAL FEATURES</th></tr>
<tr><td class="specsKey">Brand</td><td class="specsValue">SAMSUNG</td></tr>
<tr><td class="specsKey">Handset Color</td><td class="specsValue">Gold Platinum</td></tr>
<tr><td class="specsKey">Form</td><td class="specsValue">Bar</td></tr>
<tr><td class="specsKey">SIM Size</td><td class="specsValue">Nano SIM</td></tr>
<tr><td class="specsKey">Call Features</td><td class="specsValue">Loudspeaker</td></tr>
<tr><td class="specsKey">Model Name</td><td class="specsValue">Galaxy S7 Edge</td></tr>
<tr><td class="specsKey">Touch Screen</td><td class="specsValue">Yes</td></tr>
<tr><td class="specsKey">SIM Type</td><td class="specsValue">Dual Sim, LTE + LTE</td></tr>
</table>

Now I need to get the value Galaxy S7 Edge in this row from the table

<tr><td class="specsKey">Model Name</td><td class="specsValue">Galaxy S7 Edge</td></tr>

I have tried using this code

alert(String.valueOf($(".specsValue").eq(5)));

But i'm getting output as Object object

15
  • $('.specTable tr:nth-child(7)').find(".specsValue").text() use this meaning in table at 7th row class specsValue its text Commented Jul 30, 2016 at 6:36
  • I have tried your answer, but i'm getting output like this. function String() { [native code] } Commented Jul 30, 2016 at 6:40
  • i updated my comment..what output do you get? Commented Jul 30, 2016 at 6:41
  • link I have used the updated code, but i'm getting next two rows information also. Commented Jul 30, 2016 at 6:50
  • you have other element with class specsValue in row 7? can you give exact table markup? Commented Jul 30, 2016 at 6:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.