I would like to get value ON or OFF by toggled.
And default value and view is OFF.
But that code return always OFF.
<div id='toggl1'>
<fieldset>
<form id='search' method='post'>
<input id='search_withbydate' name='search_withbydate' type='hidden' value='OFF'>
<div class='row'>
<label>by date</label>
<div class='toggle' id='search_withbydate' onclick="$('search_withbydate').value = ($('search_withbydate').value == 'OFF' ?) 'OFF' : 'ON';">
<span class='thumb'></span>
<span class='toggleOn'>ON</span>
<span class='toggleOff'>OFF</span>
</div>
</div>
</input>
<input type='submit' value='search' />
</form>
</fieldset>
</div>
I do not know javascript well,I refer that below Chapter.
5.10. Miscellaneous Operators
5.10.1. The Conditional Operator (?:)
JavaScript: The Definitive Guide, 5th Edition
By David Flanagan
Publisher: O'Reilly
Thanks.
tknv/