ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
JQuery Hide()/Show() functions are not working
Title:
B
I
{code}
?
JQuery Hide()/Show() functions are not working on TextBox generated by String.cshtml Editor @{ Layout = "_FieldLayout.cshtml"; } @Html.Awe().TextBox("").CssClass("etxt") Here is the JavaScript code: if ($('#IsCompany').is(':checked') === false) { $('#SSno').hide(); $('#FedTaxID').show(); } Any idea, how can we make it work? - Thanks!
Save Changes
Cancel
nasir
asked at 05 Jan 2016
presuming that your txt id is SSno you need to call $('#SSno').closest('.awe-field').hide()
at 05 Jan 2016
Omu
Thank you! - I used following to hide the related labels as well. $("[name='SSno']").closest('.efield').hide()
at 05 Jan 2016
nasir
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK