I'm trying to do a show/hide on a radio button click and I do have it working, but I'd like to make it more...extensible/independent of hard- coding children elements to show hide.
My dummy html structure is:
I left some commented out stuff at the top of the function, hopefully to give you an idea of what I tried.
I was trying to get the first ul (the children to show/hide) on "this" (the radio button clicked). I'd like this to be flexible to where you could add more radio button/children and as long as the structure stays the same, the show/hide functionality works.
i would like to have 2 radio buttons each with a associated div when the page loads the first radio button will be checked and its corresponding div will be show when the user checks the other radio button its corresponding div is shown and the first div is hidden:
I am trying to create a script that will display content based on if aradio button is selected, and if the other is selected would hide thecontent. Now, each of these radio buttons are part of a radio group,so their names are the same. Most examples show nput:radio[@name=item] Since I have 2 items that have the same name, I can't usename, so I thought I would try id or value. It isn't working. If I addonly the show, whenever you select either radio button, it shows, andif I add the hide code, it doesn't work at allHere is what I have right now.
I want that a <div> element will show when yes is selected and when no it should be hidden. For show and hind i will use the functions from the jQuery UI. But I don't find a way to call the hide / show function when the selection change.
I am trying to develop an exam system.Find my code below.I request you to copy the code and save it as an html file .I have 2 problems:
1. Kindly notice that when the quiz is loaded,it shows both the questions by default.I want only question 1 to be visible when the quiz loads.What happens presently is that ,both questions are visible even after I click on the link Q.1( referring to question 1).However,when I click on Q. 2,then only question 2 can be seen and then(after clicking on Q.2) if I click on Q.1,then only question 1 can be seen
What I want is that when the page loads only question 1 is visible.Then when I click on Q.2,I can see only question 2 and when I click on Q.1, I can see only question 1.I later plan on adding many questions,so it should be a general solution rather than a solution good only for 2 questions.
2.Also,what I want is that,if someone selects any of the answers of a particular question,it's link color should turn green to indicate to the user that he answered that question.So for,instance,if I select an answer to the first question(select one of London,New York,Seattle,Washington,Chicago), the link Q.1 should turn green.
I am new to this kind of scripting, so I have not done it before, I have tried to find solutions on the net but none have worked. I have a 'contact us' form, which includes 2 radio buttons to select how they wish to recieve their reply... the first radio is 'email' the second radio is 'phone' When the 'phone' radio is selected, i want the div including a drop downbox to appear to ask what time to recieve a call, but when the 'email' radio is selected, this div does not appear. This is the script for this section.
I am new to this kind of scripting, so I have not done it before, I have tried to find solutions on the net but none have worked.I have a 'contact us' form, which includes 2 radio buttons to select how they wish to recieve their reply... the first radio is 'email' the second radio is 'phone'When the 'phone' radio is selected, i want the div including a drop downbox to appear to ask what time to recieve a call, but when the 'email' radio is selected, this div does not appear.This is the script for this section.
<span>Best way to reply:</span> <input type="radio" name="reply" value="Email" id="reply_0" /> E-mail <BR /> <div style="margin-left:270px;"><input type="radio" name="reply" value="Phone" id="reply_1"
I have a calculator that I want users to be able to select a radio option that will display the coresponding calculator and hide it when the other radio button is selected in other words I want to only have one visible div at a time. How would I do this?
For this piece, I need the div with id "SFSCPROJSPONCOMP" to be displayed when the user selects the Radio button with name "PROJSPON" and value "COMP".If someone could provide me with JS code for that example, I can get through the rest of this form with ease.
what i have are 3 radio buttons at top of my form, the first radio option i would like if selected to open a div that contains new questions on the form... then if the other radio buttons are selected they hide that div.
I'm trying to get my form to show and hide various divs with radio buttons. There are multiple options in the second box of my example. When a user selects the first option, more input boxes come up. Perfect, that's what I want. However, if they decide they didn't mean to click that option and instead wanted another option, the original part that popped up doesn't disappear. I cannot figure out how to make this happen.
I have a radio button called donate options are : sale , donate (values for radio buttion Option sale : 0 Option donate :1
When click on sale a row having field "cost" to be hidden. I had tried a script with hide and show when clicked on button which works fine (toggles hide an show). I am trying following code: -which toggles the hide/show effect but I want -when click on donate it should hide row having cost -when click on sale it should display row having cost
My form has some input like this:<input type="radio" value="email@example.com" id="edit-submitted-1">I want to hide the attribute value, not eliminate, or change... Is this ossible?I can get the value of this attribute using
: find('# edit-submitted-1').attr('value'); and modify using:
Basically I have a form with several questions followed by Yes/No radio buttons. Dependent on which answer is given, I want to display a different message above the text box.
For example, if you answered 'no' to a certain question then the message above the text box would change to say "Please fill in additional information" or something along those lines.