Support » Plugins » javascript within widget form

  • Koff


    I am trying to add a widget.
    The widgets form should be dynamic.
    for example Email filed is shown just if a checkbox is selected.

    From some reason i cant get it to work.

    Here is the code:

    <input id="checkme" type="checkbox" />
    <div id="extra">
    <label for="email">Email Address:</label>
    <input id="email" type="text" />

    and the javascipt:

    <script type="text/javascript"> 
    		//Hide div w/id extra
    		// Add onclick handler to checkbox w/id checkme
    		// If checked
    		if ($("#checkme").is(":checked"))
    			//show the hidden div
    			//otherwise, hide it

  • The topic ‘javascript within widget form’ is closed to new replies.