event target data atributes
event.target.getAttribute("data-sortorder");
event target data atributes
event.target.getAttribute("data-sortorder");
event target javascript
Using the event.target property together with the element.tagName property to find out which element triggered a specified event:
<body onclick="myFunction(event)">
<p>Click on any elements in this document to find out which element triggered the onclick event.</p>
<h1>This is a heading</h1>
<button>This is a button</button>
<p id="demo"></p>
<script>
function myFunction(event) {
var x = event.target;
document.getElementById("demo").innerHTML = "Triggered by a " + x.tagName + " element";
}
</script>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us