Incorrect example for javascript plugins / toggable tabs / events #3359

Closed
laczoka opened this Issue May 4, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@laczoka
Contributor

laczoka commented May 4, 2012

The current example:

$('a[data-toggle="tab"]').on('shown', function (e) {
e.target // activated tab
e.relatedTarget // previous tab
})

uses the jquery 1.7 event API and it should be

$(document).on("shown", 'a[data-toggle="tab"]', function (e) {
e.target // activated tab
e.relatedTarget // previous tab
})

@fat

This comment has been minimized.

Show comment Hide comment
@fat

fat Jun 3, 2012

Owner

no it's not incorrect - it's just not using delegation.

Owner

fat commented Jun 3, 2012

no it's not incorrect - it's just not using delegation.

@fat fat closed this Jun 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment