If you have an element with a certain class, for example class="selected"
and need to see if it has a certain rel value, how would one do that?
In basic logic:
If('.selected' has 'rel=6'){
//action
}
The simplest form is:
if ( $('.selected[rel=6]').length ){
//object found
}