jquery - How to get to the 2nd "span" tag and change the displayed text there? -


i'm using jquery v2.0 the "span" tag , change text value there. i'm getting javascript error saying "object doesnt support property or method text".

here's html resposne in firefox's firebug.

enter image description here

excuse typo below if there's any. i'm able objects when using "var $grouprows" no problem. it's use of "text()" don't work.

var jqgridgroups = $('#' + jqgridspreadsheetid).jqgrid('getgridparam', 'groupingview').groups; if (jqgridgroups != undefined) {  //this means columns aren't being grouped...     var jqgridgroupslength = jqgridgroups.length;     for(var x = 0; x < jqgridgroupslength; x++)     {         var $grouprows = $('#' + jqgridspreadsheetid).find(">tbody>tr.jqgroup>td").eq(1)[0];         $grouprows.innertext.text("ddd");         //$grouprows.text("eee");     } } 

you need use innertext javascript dom object instread of jquery object.

change

 $grouprows.innertext.text("ddd"); 

to

$grouprows[0].innertext = "ddd"; 

or

$grouprows.text("ddd"); 

Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -