Skip to content

Commit a0906d5

Browse files
committed
update the deletbutton in the generated html
1 parent 252fc14 commit a0906d5

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

notebookjs/src/public/javascripts/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ function delete_cell(id) {
246246
} else {
247247
row_id = `cell-${Number(id)}`
248248
var div_ele = document.getElementById(row_id);
249+
console.log(row_id, $(`#${row_id}`).parent().id)
249250
div_ele.parentNode.removeChild(div_ele);
250251
__code_cell_count -= 1
251252
}
@@ -265,6 +266,7 @@ $(document).on("click", "button.run", function () {
265266

266267
$(document).on("click", "button.del", function () {
267268
let id = this.id.split("_")[1]
269+
console.log(id,this.id, __code_cell_count)
268270
delete_cell(id)
269271
})
270272

notebookjs/src/public/javascripts/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function html_load(new_id){
243243
</button>
244244
</div>
245245
246-
<button type="button" id="del_btn-${new_id}" class="btn btn-sm btn-danger del"><i
246+
<button type="button" id="del-btn_${new_id}" class="btn btn-sm btn-danger del"><i
247247
class="fas fa-trash-alt"></i>
248248
</button>
249249
</div>

0 commit comments

Comments
 (0)