У меня есть объект JavaScript. И вы можете увидеть строку:
window.gv.borderiseTDCell(this);
Крайне связана с окном (если gv
не инициализировано, оно падает). Однако я действительно хочу уметь:
//bind the click event
jQuery('.highlightableTDCell').click(function () {
borderiseTDCell(this);
});
Но это не работает. Есть идеи, что я могу сделать? Это полная версия (с жесткой связью):
gridview = function () {
//bind the click event
jQuery('.highlightableTDCell').click(function () {
window.gv.borderiseTDCell(this);
});
};
//selecting cell
gridview.prototype.selectCell = function (obj) {
//dostuff to cell
};
И страница ...
<table class="EditTable" cellpadding="0" cellspacing="0">
<tr>
<td>
<div style="">0</div>
</td>
<td>
<div style="">0 akudsfsa fdhsad fiasgdf swae</div>
</td>
<td class="highlightableTDCell">
<div>
<input value="0.00"/>
</div>
</td>
</tr>
</table>