I have :
var config = {}
I have an function
$('.test').on("click",function() {
config.test = 'new'
}, check())
and then a function, if object has new value and try to check if it has new value
function check() {
if(config.test) {
console.log('there is data')
}
}
but that doesnt work, how would I do it?
, check()
is doing? It is not being called onclick. – epascarello