First with javascript you should be using the ===
operator when doing logical comparisons. Second your problem part is comparing two strings, not numbers. Try converting them to a number first.
var myInput = parseInt($('#myinput').val(), 10); //always declare a base when doing parseint
if(myInput >= 3 && myInput <= 12){
//its valid do stuff to it
}