<div class='pagename lock' style='float:left;width:200px;'>
<a href='javascript:void(0);' class='pages' title='Click to Go' rel="id" >
</div>
$(".pages a[rel=id]").parent().addClass("unlock")
The Unlock class is not adding in parent div, why?
.pages a[rel=id]? Have a look at the documentation: api.jquery.com/category/selectors