[wp-trac] [WordPress Trac] #27533: Unobtrusive JS for "Quick Edit" button at "Comments" page and others
WordPress Trac
noreply at wordpress.org
Tue Jun 10 18:28:03 UTC 2014
#27533: Unobtrusive JS for "Quick Edit" button at "Comments" page and others
----------------------------+-----------------------------------------
Reporter: aubreypwd | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.0
Component: Administration | Version: 3.9
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript, administration
----------------------------+-----------------------------------------
Changes (by wonderboymusic):
* keywords: has-patch dev-feedback => needs-patch
* milestone: Awaiting Review => 4.0
Comment:
I like this but it should use event delegation:
{{{
$( 'body' ).on( 'click', '.class-name, .other-class', function (e) {
e.preventDefault();
var element = $( e.currentTarget );
// whatever
} );
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27533#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list