Skip to content
Advertisement

JQuery.css(“display”) = “block” not working

I wanted to show and hide my TextBox based on value selected in RadiobuttonList. I wrote the following code for that

JavaScript

Though I had achieved my task by using JQuery.show() and JQuery.hide() but was not satisfied as I wanted to know why first approach failed. Second is I used $("#<%= rbtnIsPFEnabled.ClientID %>") in above code, can I reduce it to one by using something else second time like this or anything else?

I tried $(this+" input:checked").val() and $(this.toString()+" input:checked").val() but it did not work, so I had to repeat it.

Advertisement

Answer

JavaScript

if Your pfno contains your ID

then this should work

JavaScript

You Should Use FireBug For Debugging

EDIT:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement