Jquery Dialog Pop up disappears -


i trying create pop of image element rendered sharepoint. noob @ jquery. appreciated.

my code: (.imagecss image class rendered sharepoint).

$(".imagecss").on("click", function()  {  var dialogbox = $(document.createelement('div'));  $(dialogbox).dialog();  $(dialogbox).html(this);  });     

i able display images on dialog. happens is, when click on next image, previous image disappears. not sure doing wrong. appreciated. thanks!

something this, perhaps?

<html>    <head>    <script src="/jquery-1.7.1.min.js"></script>    <script src="/jquery-ui.js"></script>    <script type="text/javascript">      $(document).ready(function() {        $('#showimage').click(function() {          $('#imagedialog').dialog({            modal: true          });        });      });    </script>  </head>    <body>      <div id="imagedialog" style="display:none;">      <img src="https://www.google.com/logos/doodles/2015/126th-anniversary-of-the-public-opening-of-the-eiffel-tower-4812727050567680-hp.jpg">    </div>    <a id="showimage">show images</a>	    </body>    </html>


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -