when a user presses enter(submits) a comment on my site it submits, as i want it to. but if the user wants to make a new line ex the user presses shift+enter to make a new line and NOT submit
how is that made ?
this is my code:
$('#commentfield').keyup(function(e){
switch (e.keyCode) {
case 13: //enter
$('#commentform').submit();
break;
}
});
should i just make a new case with: case 13+16: ??
Find this Fiddle http://jsfiddle.net/jishnuap/zYEMv/ this may help you.