Jquery- Hide div

前端 未结 2 1825
广开言路
广开言路 2020-12-09 11:15

I have a div inside form something like

showing some information here
2条回答
  •  离开以前
    2020-12-09 11:45

    $(document).click(function(event) {
      var target = $( event.target );
    
      // Check to see if the target is the div.
      if (!target.is( "div#idshow" )) {
        $("div#idshow").hide();
        // Prevent default event -- may not need this, try to see
        return( false );
      }
    });
    

提交回复
热议问题