views:

272

answers:

1

Hi I am trying to use the Simple Modal plugin working, but when I click the link, the dialog box comes and goes away quickly. I am just trying to get a simple dialog running as shown in http://www.ericmmartin.com/projects/simplemodal/#examples.

Please advise how to make it running.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2'&gt;&lt;/script&gt;
    <script type='text/javascript' src='http://www.ericmmartin.com/wordpress/wp-content/themes/emm-v3/scripts/jquery.plugins.js?ver=1.0.2'&gt;&lt;/script&gt;
    <script type='text/javascript' src='http://www.ericmmartin.com/wordpress/wp-content/themes/emm-v3/scripts/jquery.simplemodal.js?ver=1.3.3'&gt;&lt;/script&gt;
    <script type="text/javascript">
 $(document).ready(function() {
   $("a").click(function() {
        // Chained call with no options
        $("#sample").modal();
   });
 });
    </script> 

 <title>hi</title>
</head>     


<body>
<a href="">Link</a>

</body>
</html>
+2  A: 

You can download the basic demo and you will have a simple example of how to use SimpleModal.

http://www.ericmmartin.com/projects/simplemodal-demos/

BTW, please don't hot-link to the scripts on my site.

-Eric

Eric Martin
+1 - Eric, since you seem to be using wordpress, if you have control over your `.htaccess`, see here for how to shut down the hot-linking easily: http://wpshout.com/a-to-z-of-wordpress-htaccess-hacks/
Nick Craver