Code:
<button id="click" class="button"></button>
<div class="TableCSS">
<table id="clickvent">
</table>
</div>
$(document).ready(function(){
$("#click").click(function(){
if($("#clickvent").is(":visible")){
$("#clickvent").hide();
} else{
$("#clickvent").show();
}
$.ajax({
url: "../Conteudo/click.html",
cache: false,
dataType: 'html'
})
.done(function(retorno) {
$("#clickvent").html(retorno);
})
.fail(function() {
alert("Algo está errado");
});
});
});
You're calling it all right, but when I click the button you need to double-click to load the contents of the click.html
page. Does anyone know the error? And just by squeezing for the first time it happens to have to double-click, to hide the content it's all normal just to load that happens.