Other Amount text box remains hidden
-
A puzzle.
The relevant code:
<input id="fourth_button" type="radio" name="a3" value="other"> <label for="fourth_button"> Other <span class="dntplgn_pm_label">/month</span></label> <br> <input class="dntplgn_monthly_other_sum" type="text" name="dntplgn_monthly_other_sum" placeholder="Enter Amount" style="display: none;">
The relevant CSS:
.dntplgn_donate_monthly .dntplgn_monthly_other_sum.checked { display: block !important; } .dntplgn_donate_monthly .dntplgn_monthly_other_sum{ margin-top: 10px; }
I admit this CSS isn’t likely the culprit but in JS I found:
/* Donate Plugin Scripts */ ( function( $ ) { $( document ).ready( function() { $( '.dntplgn_monthly_other_sum' ).hide(); $( '.dntplgn_donate_monthly input[ name="a3" ]' ).click( function() { if ( $( this ).parent( '.dntplgn_donate_monthly' ).children( '#fourth_button' ).attr( 'checked' ) ) { $( this ).parent( '.dntplgn_donate_monthly' ).children( '.dntplgn_monthly_other_sum' ).addClass( 'checked' ); $( this ).parent( '.dntplgn_donate_monthly' ).children( '.dntplgn_submit_button' ).click( function() { $( this ).parent( '.dntplgn_donate_monthly' ).children( 'input[ name="a3" ]' ).val( $( this ).parent( '.dntplgn_donate_monthly' ).children( '.dntplgn_monthly_other_sum' ).val() ); }) } else { $( this ).parent( '.dntplgn_donate_monthly' ).children( '.dntplgn_monthly_other_sum' ).removeClass( 'checked' ); $( this ).parent( '.dntplgn_donate_monthly' ).children( '.dntplgn_monthly_other_sum' ).val( '' ); $( this ).parents( '.dntplgn_donate_monthly' ).find( '.dntplgn_submit_button' ).off('click'); } }); $( '.dntplgn_form_wrapper' ).tabs(); }); })(jQuery)
And all that seems to do is add the class
checked
which is what suggests the CSS rule .dntplgn_monthly_other_sum.checked applies. If I removestyle="display: none;"
from the textbox in Chrome’s debugger then if displays. Something about the CSS on top of the local style ain’t working.But it’s a little beyond obvious to me. Be appreciative if this could be diagnosed and fixed. Thanks kindly.
The page I need help with: [log in to see the link]
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Other Amount text box remains hidden’ is closed to new replies.