Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$.fn.on with a delegate provided: $(this) returns parent, not delegate #188

Closed
coheredigital opened this issue May 18, 2018 · 1 comment
Closed
Labels

Comments

@coheredigital
Copy link

Example:

<div class="calendar">
    <div class="next"></div>
</div>
$(".calendar").on('click',".next",function(){
	console.log($(this));
});

$(this) returns
{0: div.calendar, length: 1}
instead of
{0: div.next, length: 1}

I don't believe this is correct behavior.

@fabiospampinato
Copy link
Owner

Thanks for reporting the issue, I've fixed it in v2.1.6 (8ad05a5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants