Created
          June 18, 2021 10:05 
        
      - 
      
- 
        Save annelyse/d2b2df0fe11f475ebc84550f0247d043 to your computer and use it in GitHub Desktop. 
    Selectionner un element apres qu'il ai été crée en js appen cibler le document et pas l'élément directement 
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $(document).on('click','.tooltip-close',function(){ | |
| //your code here | |
| alert('test'); | |
| }); | |
| document.addEventListener('click', function (e) { | |
| if (e.target.className === 'tooltip-close') { | |
| e.target.parentElement.remove(); | |
| } | |
| }, false); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment