[Solved] Get text value of html elements with same #Id


You may simplify your selector and remove the a and use the following code where rowId holds the id of the row you wish to retrieve:

var linkText = $('#'+ idVal +'[rowid=\"'+ rowId +'\"]').text();

or just hardcode the row id like that:

var link1Text = $('#'+ idVal +'[rowid="1"]').text();
var link1Text = $('#'+ idVal +'[rowid="2"]').text();

Cheers,

solved Get text value of html elements with same #Id