Note that there are some explanatory texts on larger screens.

plurals
  1. PORadio Toggle Button Issue
    primarykey
    data
    text
    <p>I have a radio type Toggle buttons. There are Three buttons and option to select only one button at a time. But the problem is buttons always remain selected(I know radio button don't have option to unchecked ). There is no Option to Unchecked all. </p> <p>I would like to Do something like this:</p> <p>If any selected button clicked again it will Unchecked . But if not clicked on the selected button it will work same what it is in current. </p> <p>Is this possible to make? Sorry for bad English</p> <p>Here is Demo link: <a href="http://jsfiddle.net/saifrahu28/eQ744/4/" rel="nofollow"><strong>Js Fiddle</strong></a></p> <p><strong>HTML</strong></p> <pre><code>&lt;div style="margin:0px auto; margin-top:100px; width:960px;"&gt; &lt;a href="#"&gt; &lt;span class="toggleButtonRadio normal"&gt;toggle Radio button&lt;/span&gt; &lt;/a&gt; &lt;a href="#"&gt; &lt;span class="toggleButtonRadio normal"&gt;toggle Radio button&lt;/span&gt; &lt;/a&gt; &lt;a href="#"&gt; &lt;span class="toggleButtonRadio normal"&gt;toggle Radio button&lt;/span&gt; &lt;/a&gt; &lt;/div&gt; </code></pre> <p><strong>CSS</strong></p> <pre><code>* { margin: 0; padding: 0; border: 0px; } body { background: #fafafa; font-family: Helvetica, Arial, sans-serif; font-size: 0.813em; color:#333333; } a {color:#737373;text-decoration:none; } a:link { text-decoration: none;outline: none; } a:visited {text-decoration: none; } a:hover {color:#454545; } a:active {text-decoration: none; } ul {list-style: none; text-decoration: none; } ol {list-style-position: inside; color:#333333;padding:12px 10px 25px 15px;font-size: 1.07em;} ol, li {padding-bottom:8px;} img {} em {color: #737373; font-weight:300;} h1 {color: #737378; margin:20px 5px 20px 0px; font-size:2.4em; text-transform:uppercase;letter-spacing:1px; font-weight:100; text-shadow:1px 1px 1px #fff; } h2 {color: #454545; margin:10px 5px 0px 0px;} h3 {color: #454545; margin:10px 5px 0px 0px;} h4 {color: #454545; margin:10px 5px 20px 0px; font-size:1.2em; width:98%; border-bottom:1px solid #eee;padding-bottom:10px;} h5 {color: #454545; margin:10px 5px 0px 0px;} h6 {color: #454545; margin:10px 5px 0px 0px;} p { color:#333; font-size:1.154em; margin:5px 10px 10px 0px; padding-bottom:10px;line-height:140%;} hr { border: 0; clear: both; display: block; width: 100%; background-color: #bbbbbb; height: 1px; margin: 5px 0px; } select { color: #454545; } .toggleButtonRadio , .toggleButton { background: #e1e1e1; text-decoration: none; text-align: center; font-family: Helvetica, Arial, sans-serif; font-size: .769em; font-weight: 900; color: #454545; text-transform: uppercase; text-decoration: none; padding: 5px 10px; -webkit-border-radius: 15px; border-radius: 15px; -webkit-box-shadow: 0px 0px 3px 0px rgba(64, 64, 64, .5); box-shadow: 0px 0px 3px 0px rgba(64, 64, 64, .5); } .toggleButtonRadio:hover, .toggleButton:hover{ background:#d4d4d4; } .toggleButtonRadio.active , .toggleButton.active{ background:#90bf00; color:#fff; } .active:hover{ background:#7ca600; } </code></pre> <p><strong>js</strong></p> <pre><code>$('.toggleButtonRadio').click(function(){ $('.toggleButtonRadio').removeClass("active"); $(this).toggleClass("active"); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload