The function I created in Jquery, is not being called in the first click, it is only triggered in the 2nd. I'm using ASP.NET, C #, I need the panel component to start hidden, so by clicking on the p tag it appears and so calling the toggle () method every time you click it. My code is this:
<script type="text/javascript">
$(document).ready(function () {
$("#pnlSalas").css('visibility', 'hidden');
$('.a').click(function () {
$("#pnlSalas").toggle();
$("#pnlSalas").css('visibility', 'visible');
});
});
</script>