What do you mean by "to work with every ID bttn1"? Ids need to be unique, so
there should only be one button with that id.

Other than that, are you looking to create multiple dialogs and have each of
them open at the same time? Or you want to create a dialog if any button is
pressed, but from a dynamically created element, so that you don't need a
dialog element for each button?

- Richard

On Tue, Jan 13, 2009 at 6:37 AM, Ayah <e...@eckan.be> wrote:

>
> Hi,
> Im building a search engine for my website.
> And i want to have a button on each searchresult that a dilog will
> showup with more info.
> Like this:
> Searchresult:
> Google.se
> (button)
> ------------------
> Yahoo.com
> (button)
>
> and so on...
>
> But i dont know how to crate a "dynamic" javascript for the dialog
> function.
> AS i understand it when u do like this.
>        <script language="javascript" type="text/javascript">
>            $(document).ready(function() {
>                // Tell jQuery that our div is to be a dialog
>                $('#dialogTest').addClass('flora').dialog({
>                        autoOpen: false
>                });
>
>                $('#bttn1').click(function() {
>                    $('#dialogTest').dialog('open');
>                });
>            });
>        </script>
>
> Its static only to the "bttn1".
>
> Who to do the script dynamic to work with every ID bttn1?
>

Reply via email to