Set element to unclickable and then to clickable

前端 未结 6 897
花落未央
花落未央 2021-02-04 04:26

I want to have a div element set to not be clickable and then set it to clickable after another element is clicked.

So, when .case is clicked:

$(\'.case\         


        
6条回答
  •  长发绾君心
    2021-02-04 05:25

    for first instance..add deactive class to patient div tag...
    
    $('#patient').click(function() { 
    if($(this).hasClass('deactive'))
     return;
    else
    //do what you want to do.
    });
    
    on case click...
    
    $('.case').click(function() {  
    $('#patient').removeClass('deactive');
    });
    

提交回复
热议问题