Answers for "jquery detach and appendto"

0

jquery detach and appendto

var alldivs = $("#first,#second,#third,#fourth");
var wrapper = $(".operation");
alldivs.hide();

 var divs = $(alldivs).detach();
    jQuery("input[name='gentype']").change(function () {
        var label = $(this).val();
        $(divs).each(function(){
            if($(this).prop('id') == label){
                $(wrapper).html('');
                $(this).appendTo(wrapper).show();
            }
        });
    })
Posted by: Guest on June-11-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language