I think you have your links to thisconfused. If I understand your question correctly, this should do what you want:
function levels() {
var $this = $(this);
if ($this.is(':not(:checked)') {
$(':input').each(function() {
if (this.title === ('RQLevel' + $this.attr('src'))) {
$(this).removeAttr('checked');
}
});
}
}
Update:
, src . src , URL. "2" "http://example.com/2". , . . jsfiddle .
, onclick jQuery . bind(). JavaScript:
$(function() {
$(':input').bind('click', function() {
var src = $(this).data('src');
if (!this.checked) {
$('input:checked').each(function(){
if (this.title === ('RQlevel' + src)) {
this.checked = false;
}
});
}
});
});