Hello,
I have the following code:
<body>
<form>
<input type="text"/>
</form>
<script>
$( function () {
$(document).bind("EVENT", function (event, element) {
console.log("BIND", element, event);
});
$("form").each( function iterate(index, element) {
console.log("BEFORE BIND", element);
$(document).trigger("EVENT", element)
});
})
</script>
</body>
I expect that the element that i pass to the TRIGGER is the same as i get at the BIND but no
BEFORE BIND: this's the FORM, as it's expected
BIND: this is the INPUT box, no idea why
is it a bug or i miss something?
best, Viktor