Support » Plugin: Shutter Reloaded » [Plugin: Shutter Reloaded] Random image open with shutter effect

  • Hi,

    I need to open a random image using the shutter effects, here is the code I have so far :

    <script language="JavaScript">
    function random_imglink(){
      var myimages=new Array()
      //specify random images below. You can have as many as you wish
      //specify corresponding links below
      var ry=Math.floor(Math.random()*myimages.length)
      if (ry==0)
         var fullpath = "<?php bloginfo('template_url'); ?>/cartes/";
         var url = fullpath+myimages[ry];

    The html tag is this :

    <a class="shutter" onclick="random_imglink();" id="liencarte" href="#"><br /><br /><div id="icon_cartes"><img id="imgcarte" src="<?php bloginfo('template_url'); ?>/images/icon_cartes.png" /></div></a>

    But each time I click on the link, it open one image randomly image but not using the shutter effect (it only open it in the browser). If I put one of the link directly in the href of the tag and remove the “OnClick” event, shutter effect show correctly with the image.

    Anyone can help me achieve that ?

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

  • The topic ‘[Plugin: Shutter Reloaded] Random image open with shutter effect’ is closed to new replies.