Choosing the same brand radio button

Hello,

This JavaScript code running but does not work when “screwDefaultButtons ()” is active don’t know javascript, can you help?

<script>
(function(){
if(!NodeList.forEach)
NodeList.prototype.forEach = Array.prototype.forEach;
nodeList=document.querySelectorAll('input[type=radio]');
nodeList.forEach(function(node){
    node.disabled = node.checked = false;
    node.addEventListener('click',function(e){
        nodeList.forEach(function(node){            
            if( e.target.parentNode.parentNode.querySelector('a').nextSibling.textContent == node.parentNode.parentNode.querySelector('a').nextSibling.textContent){
                node.checked = true;            }
        });
    });
});

clearRadio();
function clearRadio(){
nodeList.forEach(function(node){
node.checked = false;
});
}
}());
</script>

“screwDefaultButtons ()” disable: https://jsfiddle.net/ademgenc/b94Ldmp5/

“screwDefaultButtons ()” enable: https://jsfiddle.net/ademgenc/b94Ldmp5/1/

Thank you from now

Can you help me solve this problem?

Sponsor our Newsletter | Privacy Policy | Terms of Service