thanks it work.
i place the code in $(document).ready(function()
$(document).ready(function() {
$('#nn').numberbox().unbind('keypress.numberbox').bind('keypress.numberbox',function(e){
if (e.which == 45){ //-
if ($(this).val().indexOf('-') == -1){
return true;
} else {
return false;
}
} if (e.which == 46 || e.which == 44) { //.,
if ($(this).val().indexOf('.') == -1){
return true;
} else {
return false;
}
}
else if ((e.which >= 48 && e.which <= 57 && e.ctrlKey == false && e.shiftKey == false) || e.which == 0 || e.which == 8) {
return true;
} else if (e.ctrlKey == true && (e.which == 99 || e.which == 118)) {
return true;
} else {
return false;
}
});
});
it don’t work in "easyui-layout" loadet files.
called with
function center37(){ $('#p').panel('refresh','include/NumberBox.php'); }
I see a lot to learn for me.
can i have a hint please