<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
var id1=2,id2=7,id3=11;
var summ = ''+id1+' '+id2+' '+id3;
$('p[rel="'+summ+'"]').each(function(){
alert($(this).html());
});
});
</script>
<p rel='1 14 20'>1 14 20</p>
<p rel='2 7 11'>2 7 11</p>
<p rel='44 3 33'>44 3 33</p>