JQuery - How to use a href link to call a dialog

0

I need a command that opens a dialog every time I click on a link ...

    <map name="Mapeamento">
    <div id="dialog" title="Imagem1">
            <p>Informação 1</p>
            <p>Informação 2</p>
            </div>
            <script>
            $( "#dialog" ).dialog({autoOpen: false});
            </script> <area shape="poly" coords="1020,240,1000,225,1020,210,1040,215" href="ABRIR A DIALOG APARTIR DAQUI">

I tried things like: href="Image1" , for example, but nothing worked.

I have to use the href command because I'm using the image mapping function. I've searched in many places, but none said how to transform a certain area by area shape into a link that opens a dialog box ... Thank you in advance!

    
asked by anonymous 08.08.2016 / 01:54

1 answer

1

Change true to false:

$("#dialog").dialog({autoOpen: false});

Just view as true:

$(document).ready(function() {
  $("#dialog").dialog({autoOpen: true});
});
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script><scriptsrc="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>

<map name="Mapeamento">
  <div id="dialog" title="Imagem1">
    <p>Informação 1</p>
    <p>Informação 2</p>
  </div>
  <area shape="poly" coords="1020,240,1000,225,1020,210,1040,215" href="ABRIR A DIALOG APARTIR DAQUI">
    
08.08.2016 / 13:51