traversing from variable in jquery -
i trying traverse variable required destination, but, not. trying 'th' width in 'table'. below code not working. making sense? please. if not, how can traverse variable required point. please?
var tabnamecurr = $("table#refparts"); alert($(tabnamecurr + "thead tr th").eq(5).width()); also, have tried below code , working expected.
alert($(tabnamecurr).find("thead tr th").eq(5).width()); but, intention need traverse variable, how can achieve that?
your second method should have worked, don't know why isn't , @dhavalmarthak said without $ works since have object of table!
var tabnamecurr = $("table#refparts"); alert(tabnamecurr.find("thead tr th").eq(5).width()); i suggest check console errors or whether have 6 th's in table eq(5) refers 6th header!!
Comments
Post a Comment