I want to know how can I save a value inside a jquery bind when this is inside a namespace.
var obj = obj || (obj ={
valuetosave:-1,
init:function(){
$("some selector").on("click",function(){
tmpval = I get some value here
how can asign 'tmpval' to obj.valuetosave if I can't use this because
is in the jquery scope
})
}
})
I know that neither the title or my little description is not much useful, I hope the little example can speak about my issue.
Thanks