javascript - Remove :checked from the input with the text of the button -


i duplicate values checkpoint block. clicking on new element, must removed , filter selection, too. please find mistake.

    $('.views-exposed-widget').on('change', 'input', function () {         var self = $(this),             name = this.name,             text = self.closest('.form-type-radio').find('label[class="option"]').text(),             target = $('.duplicate-filter').find('[data-for="'+ name +'"]');          if (target.length == 0){             target = $('<span class="o_filt" data-for="'+name+'"></span>').appendto('.duplicate-filter');         }         target.text( text );          $('.o_filt').on('click', function(){             var l = $(this).text();                 m = $('.views-exposed-form .form-type-radio label.option');             $(this).remove();             m.each(function(){                 if($(this).text().indexof(l)!=-1){                     $(this).closest('input[type="radio"].dls-radio').removeattr('checked');                                      }             });         });      });  

example: http://jsfiddle.net/e59ogp8a/5/

use .prop('checked', false) so:

        $('.o_filt').on('click', function () {             var l = $(this).text();             $(this).remove();             $('input[name="' + $(this).data('for') + '"]').prop('checked', false);         }); 

fiddle


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -