jquery - How to un-selecte li of UI Selectable via element click event? -
i want unselected selected li click other element.e.g:
<style> #feedback { font-size: 1.4em; } #selectable .ui-selecting { background: #feca40; } #selectable .ui-selected { background: #f39814; color: white; } #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; } </style> <script> $(function() { $( "#selectable" ).selectable(); }); </script> <div class="demo"> <ol id="selectable"> <li class="ui-widget-content"><a href="">link can not click</a></li> <li class="ui-widget-content">item 2</li> <li class="ui-widget-content">item 3</li> <li class="ui-widget-content">item 4</li> <li class="ui-widget-content">item 5</li> <li class="ui-widget-content">item 6</li> <li class="ui-widget-content">item 7</li> </ol> <a href="">click me unselected</a> </div><!-- end demo -->
thank much!!
just removing class seems work fine (from jsfiddle of previous question):
<a href="#" id="unselect">click me unselected</a>
and then:
$('#unselect').click(function(event) { $('#selectable>li').removeclass('ui-selected'); });
Comments
Post a Comment