*/
jQuery( function( $ ) {
// Select all h1-h6 elements that contain editsection links
- $( 'h1:has(.editsection a), ' +
- 'h2:has(.editsection a), ' +
- 'h3:has(.editsection a), ' +
- 'h4:has(.editsection a), ' +
- 'h5:has(.editsection a), ' +
- 'h6:has(.editsection a)'
+ $( '.mw-h1:has(.editsection a), ' +
+ '.mw-h2:has(.editsection a), ' +
+ '.mw-h3:has(.editsection a), ' +
+ '.mw-h4:has(.editsection a), ' +
+ '.mw-h5:has(.editsection a), ' +
+ '.mw-h6:has(.editsection a)'
).live( 'contextmenu', function( e ) {
// Get href of the [edit] link
var href = $(this).find( '.editsection a' ).attr( 'href' );