I'm trying to get spans text by passing the value of span id to the function like this :
function getDetails(testDetailId){
alert(jq("#"+testDetailId).text());
}
And I always get null alerted when the click is invoked :
jq("table tr").click(function(){
var testDetailId = jq(this).attr("id");
getDetails(testDetailId);
});
I use jquery no conflict :
var jq = jQuery.noConflict();
some html :
<span id="2">[{"testId":22,"testPerfReports":[]}]</span>
Any ideas ?