Skip to content

Commit

Permalink
Use name instead of id in js for forward compatibility with WordPress…
Browse files Browse the repository at this point in the history
… 4.4
  • Loading branch information
Luke Carbis committed Nov 6, 2015
1 parent b78d40a commit 2b2493c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/js/admin.js
Expand Up @@ -233,7 +233,7 @@ jQuery( function( $ ) {
var all_hidden = true;

// If all filters are hidden, hide the button
if ( $( 'div.metabox-prefs [id="date-hide"]' ).is( ':checked' ) ) {
if ( $( 'div.metabox-prefs [name="date-hide"]' ).is( ':checked' ) ) {
all_hidden = false;
}

Expand All @@ -255,7 +255,7 @@ jQuery( function( $ ) {
}
}

if ( $( 'div.metabox-prefs [id="date-hide"]' ).is( ':checked' ) ) {
if ( $( 'div.metabox-prefs [name="date-hide"]' ).is( ':checked' ) ) {
$( 'div.date-interval' ).show();
} else {
$( 'div.date-interval' ).hide();
Expand All @@ -264,7 +264,7 @@ jQuery( function( $ ) {
$( 'div.actions select.chosen-select' ).each( function() {
var name = $( this ).prop( 'name' );

if ( $( 'div.metabox-prefs [id="' + name + '-hide"]' ).is( ':checked' ) ) {
if ( $( 'div.metabox-prefs [name="' + name + '-hide"]' ).is( ':checked' ) ) {
$( this ).prev( '.select2-container' ).show();
} else {
$( this ).prev( '.select2-container' ).hide();
Expand Down

0 comments on commit 2b2493c

Please sign in to comment.