0

これの下部を達成したかった: ( https://stackoverflow.com/a/11545559/688830 )、フォームがクリックされたときにそれが残るようにします。でも、私の場合は残りません。理由はありますか?

<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>
4

1 に答える 1