Fixed the bug #1 (Quando faço uma linha, e apago um elemento, a sua
classe não é eliminada).
master
lostheaven92 2016-10-19 19:03:46 +01:00
parent 2ebfa6b17b
commit c202dead9f
1 changed files with 8 additions and 3 deletions

View File

@ -87,8 +87,9 @@
}
function cleanBoard(){
$("input.with-value").val('').removeClass('with-value').removeAttr('style').removeClass('individual-highlight');
$("input:disabled.initial").removeAttr("disabled").val('')
var $cell = $("input.with-value").val('');
$("input:disabled.initial").removeAttr("disabled").val('');
cleanUsableCell($cell);
}
function delay5Seconds(functionToExecute){
@ -98,7 +99,7 @@
function cellsOnChangeListener(){
$('input[data-column][data-line]').change(function(){
if($(this).val() === ""){
$(this).removeClass('with-value');
cleanUsableCell($(this));
}
else{
insertNumber($(this));
@ -227,4 +228,8 @@
return $myArray;
}
function cleanUsableCell($elem){
$elem.removeClass('with-value').removeAttr('style').removeClass('individual-highlight');
}
})();