as in the table row:

</td><td> <span id="dnn_ctr372_eMini_Stock_gvStock_ctl02_lblCard">27077932</span> </td><td style="font-weight:bold;">BERAL</td><td align="center"> <span id="dnn_ctr372_eMini_Stock_gvStock_ctl02_lblQty" style="background-color:Transparent;font-weight:bold;">3</span> </td><td align="center"> <span id="dnn_ctr372_eMini_Stock_gvStock_ctl02_Label3">254,64</span> </td><td align="center" style="font-weight:bold;"> <span id="dnn_ctr372_eMini_Stock_gvStock_ctl02_Label2">313,21</span> </td><td> <span id="dnn_ctr372_eMini_Stock_gvStock_ctl02_lblPastaba">z zestawem montaŃŤowym</span> </td><td valign="middle"> <img id="dnn_ctr372_eMini_Stock_gvStock_ctl02_imgType" title="0" class="AlgMdl" src="/emini/Images/ratingplus.gif" style="border-width:0px;"> <span id="dnn_ctr372_eMini_Stock_gvStock_ctl02_lblStore" title="1800" style="background-color:Transparent;">RZESZĐŁW</span> </td> </tr> 

to pull out "Beral" using jquery / phpquery? Thanks.

    1 answer 1

    Here is the access to the text element:

     var text = $("#dnn_ctr372_eMini_Stock_gvStock_ctl02_lblCard").parent().siblings('td:first').text(); 

    http://codepen.io/anon/pen/PNqErK

    • Yes, but <td style = "font-weight: bold;"> BERAL </ td> does not have <span id ....> It has only font-weight: bold, which is repeated for other elements throughout the table , and the value of this cell is met more than once, it is in each line of the table. - Roma Tulaydan
    • so what do you need to choose? only one item? - Maks Devda
    • no, from <td style = "font-weight: bold;"> BERAL </ td>, take a value from all rows of the table - Roma Tulaydan
    • cite all html code - Maks Devda