I am having some trouble with an if statement. I want to set num to 0 of NaN:
$('input').keyup(function() {
var tal = $(this).val();
var num = $(this).data('boks');
if(isNaN(tal)) {
var tal = 0;
}
});
This question is related to
javascript
jquery
Source: Stackoverflow.com