Snippets Collections
cell.cellButton.tag = indexPath.row
            cell.cellButton.addTarget(self, action: #selector(yourFunc(sender:)), for: UIControl.Event.touchUpInside)
                                                            
@objc func yourFunc(sender: UIButton){
    let buttonTag = sender.tag
}
document.addEventListener("click", e => {
if(e.target.matches(".clase")||e.target.matches(`${".clase"} *`)) {
  
  ...
}
})

/* Otro */

  document.addEventListener("click", (e) => { 

        if(e.target.classList.contains("desplegable") || e.target.parentElement.classList.contains("desplegable")) {

            document.querySelector(".filtros-desplegables").classList.toggle("is-active");
        }
        
      })
  
star

Mon Dec 05 2022 15:28:43 GMT+0000 (UTC) https://github.com/0x29a/cli_template

#cli #click
star

Sun Oct 31 2021 19:12:46 GMT+0000 (UTC)

#click

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension