When I create a Form using JS to open the Button of a Button, the text of the Button is deformed.
#openSendForm{
background: #0ebd64;
position: absolute;
width: 250px;
height: 50px;
right: 70px;
top: 15px;
text-align: center;
font-size: 30px;
font-family: "Futura";
}
<!DOCTYPE html>
<html>
<head>
<link href="StyleMain.css" rel="stylesheet" type="text/css"/>
<title>Teste</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script><scriptsrc="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function() {
dialog = $("#teste1").dialog({
autoOpen: false,
height: 500,
width: 500,
modal: true,
buttons: {
Ok: function() {
$(this).dialog( "close" );
}
}
});
$("#openSendForm").button().on( "click", function()
{
dialog.dialog( "open" );
});
});
</script>
</head>
<body>
<input type="button" id="openSendForm" value="Enviar Torrent">
<div id="teste1">
<input type="file" id="teste" value="Escolher Torrent">
<input type="button" id="teste2" value="Enviar">
</div>
</body>
</html>
When I'm not using the button to open the Form it looks like this ( $("")
):
ButwhenIuseittoopentheFormitlookslikethis($("#openSendForm")
):