function getCellIndex exit with error: TypeError c is undefined
jQuery v1.7
firefox 14.0.1
I get this error when click on cell:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
Cell define:<br /> function _formatterControl (cellvalue, options, rowObject) {<br /> var div = '<img decoding="async" class="checkbox" src="/blog/';<br /> if (!cellvalue) {<br /> div += checkboxoff;<br /> }else {<br /> div += checkboxon;<br /> }<br /> div += '" alt="" />';<br /> return div;<br /> <br /> }<br /> <br /> .....<br /> {<br /> name:'control',<br /> align: 'center',<br /> width: '18px',<br /> sortable: false,<br /> formatter:_formatterControl<br /> },<br /> ..<br /> <br /> the function:<br /> <br /> getCellIndex : function (cell) {<br /> var c = $(cell);<br /> if (c.is('tr')) {<br /> return -1;<br /> }<br /> c = (<br /> !c.is('td')<br /> &&<br /> !c.is('th') ? c.closest("td,th") : c<br /> )[0];<br /> console.log (c); --- here I get undefined<br /> if ($.browser.msie) {<br /> return $.inArray(c, c.parentNode.cells);<br /> }<br /> return c.cellIndex;<br /> }<span style="white-space: normal;"><br /> </span> |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top