I have the following code in an html page
jQuery("input[name='newstate']").change(function(){
if(jQuery(this).attr("checked")) {
jQuery('input[name="new-state-name"]').show();
} else {
jQuery('input[name="new-state-name"]').hide();
}
});
But jquery lint gives following message.
You should only use the same selector more than once when you know the returned collection will be different. For example, if you've added more elements to the page that may comply with the selector
How do I modify my code to remove this message