I wanted to achieve the bottom part of this: (https://stackoverflow.com/a/11545559/688830), so that when my form is clicked it remains. But for me, it doesn't remain. Any idea why?
<script>
$(document).ready(function () {
$("#pvauth").click(function () {
$("#container_demo").show();
$("#pvauth").hide();
});
});
</script>
// this script only half works.. it hides when i click on form but i want it to stay.
<script type="text/javascript">
$(document).click(function (e) {
// check that your clicked element has no id=info
if (e.target.id != 'container_demo' && !$('#container_demo').find(e.target).length && e.target.id != 'pvauth') {
$("#container_demo").hide();
$("#pvauth").show();
}
});
</script>