jquery - IE8 Object Doesn't Support Method... ".closest()" -



jquery - IE8 Object Doesn't Support Method... ".closest()" -

hate bother must simple, maintain getting ie8 unsupported property or method error next code. works fine in firefox.

compname = comps[index].getelementsbytagname("compname")[0].firstchild.nodevalue; compdesc = comps[index].getelementsbytagname("description")[0].firstchild.nodevalue; nextcluster = comps[index].closest("skillcluster").getelementsbytagname("skillname")[0].firstchild.nodevalue; <factor> gets results </factor> <skillcluster> <skillname> works , efficiently </skillname> <competency id="25"> <compname> plans , aligns </compname> <description> planning , prioritizing work meet commitments aligned organizational goals. </description> </competency> <competency id="27"> <compname> resourcefulness </compname> <description> securing , deploying resources , efficiently. </description> </competency> </skillcluster>

the 3rd line contains error. array/nodelist comps[] result previous search "competency" tags in xml doc. construction of local xml shown. stepwise removal of other parts of line except .closest() returns @ to the lowest degree object (via alert) , no error. other parts compname , compdesc working fine. after text innards in cases. help, always, much appreciated!

the closest method jquery method, need create jquery object containing element utilize it. result jquery object, need [0] element it:

nextcluster = $(comps[index]).closest("skillcluster")[0].getelementsbytagname("skillname")[0].firstchild.nodevalue;

jquery closest

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -