$('input:radio').click(function() { var theme = $(this).val(); $('link').each(function() { this.disabled = true; if ($(this).attr('title') == theme) { this.disabled = false; } }); });