-1
I am a beginner in this language and I have the following question: the code below is working, but if I take the comment from the part * With this block does not work*, It doesn’t work now, but I need it to activate a calendar on another source I have. Is there any way it works without the block leaving the body and the datepicker script remains in the head?
<!DOCTYPE html>
<html>
<head>
<meta content="text/html">
<meta charset= "UTF-8" http-equiv="content-type">
<title>Consulta de Apartamento</title>
<link rel="stylesheet" href="css/estilos_gerais.css" type="text/css">
<link rel="stylesheet" href="css/retorno_consulta.css" type="text/css">
<script src="http://code.jquery.com/jquery-2.2.3.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.4.0.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<!-- *** Com este bloco não funciona***
<script type="text/javascript">
$(function() {$( ".data" ).datepicker({
showOn: "button",
buttonImage: none,
buttonImageOnly: true,
changeMonth: true,
changerYear: true,
showOtherMonths: true,
selectOtherMonths: true,
dateFormat: 'dd/mm/yy',
dayNames:['Domingo','segunda','Terça','Quarta','Quinta','Sexta','Sábado','Domingo'],
dayNamesMin: ['D','S','T','Q','Q','S','S','D'],
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab','Dom',],
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto',
'Setembro','Outubro','Novembro','Dezembro',],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez']});});
</script> -->
</head>
<body>
<script type="text/javascript">
$(document).ready(function () {
$("#btnTestar").click(function(){
alert("Hello, World.");
});
});
</script>
<form>
<button id="btnTestar">Testar</button>
</form>
</body>
</html>
You are loading jQuery 2 times. Delete
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
and put quotes onnone
:buttonImage: "none",
– Sam