radio button to show div on loading a form using jQuery -


The problem below me is that I am working with a form that is available through many different steps The function that gets passed triggers the 'show'.

Can this show be triggered by something similar in onload?

So explain the big picture here. I got a form with a radio button to add an image. Phase 1 of the form is for the author, for stage 2 of the content editor. Therefore the form is completed and has been sent to the content editor. If the radio button is checked on stage 1 then the divisor is displayed. When this form is passed for stage 2, div is still shown to me. Hope this will tell my problem further.

Step 2 is a completely different page.

Sorry this is my first time here!

Markup
  & lt; Input type = radio id = "image1" name = "image1" & gt; Image 1 & lt; / Input & gt; & Lt; Input type = radio id = "image2" name = "image2" & gt; Image 2 & lt; / Input & gt; & Lt; Div id = "div-id1" style = "display: none" & gt; Image 1 & lt; / Div & gt; & Lt; Div id = "div-id2" style = "display: none" & gt; Image 2 & lt; / Div & gt;   

javascript
  $ ("# image1"). Click (function () (if ($ ("$ image1") (": show" ("slide");} and {$ ("# div-id1"). Hide ("slide");} } "$ (" # Image2 "). Click (function () {if ($ (" # image2 "). (": Checked ")) {// hidden div $ (" # div- Id2 "). (" Slide ");} and {$ (" # div-id2 "). Hide (" slide ");}});    

Try it. This is working for me

  $ ("# Image1") Click (function Show the hidden div $ ("# div-id1") show ();}}) $ ("$ (": "# image1") ("(checked:") # Image2 "). Click (F Show the hidden div $ ("# div-id2"). ();}});    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -