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

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -