Add domain on enter button keypress

Only activates when the input has focus.
This commit is contained in:
Mcat12
2016-05-19 20:37:30 -04:00
parent a9512594ca
commit c69b434a8a
+6
View File
@@ -54,6 +54,12 @@ require "footer.php";
<script>
window.onload = refresh;
$.ajaxSetup({cache: false});
$(document).keypress(function(e) {
if(e.which === 13 && $("#domain").is(":focus")) {
// Enter was pressed, and the input has focus
add();
}
});
function refresh() {
$.ajax({