Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<button data-cart-itemid="1be8718a-6993-4036-b7c6-8579e342675d" data-action="inc">
  <img src="https://www.webfx.com/wp-content/themes/fx/assets/img/footer/footer-roket.png">click it</span>
  </button>
</body>
</html>
 
document.addEventListener('click', (e)=>{
  console.log(e.target.activeElement)
    //console.log(e.target.closest('button').hasAttribute("[data-action='inc']"));
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers