I have simple jQuery UI function. but I have multiple buttons where I want to show different dialog windows. My problem is that when I push button all dialog windows on page opens but I need only the one who is under the same `.dialog-frame` class div.

```
$(function() {
  $( ".dialog" ).dialog({
    autoOpen: false, 
    show: {},
    hide: {} 
  });
  $( ".opener" ).click(function() {
    $( ".dialog" ).dialog( "open" );
  });
});

```

And here is my html

```
<div class="dialog-frame">
  <div class="dialog" title="Basic dialog">
    <p>AaAaAAAAAaaaaaA</p>
  </div> 
  <a class="opener">A</a>
</div>

<div class="dialog-frame">
  <div class="dialog" title="Basic dialog">
    <p>BbbBbbbBBBBBBbb</p>
  </div> 
  <a class="opener">B</a>
</div> 

```

Working Fiddle there : **[Try it yourself](http://jsfiddle.net/MfegM/2203/)**