jquery Image Special effects plug-in revealing to achieve stretch amplification _jquery

Source: Internet
Author: User

Click the picture, the picture stretch enlarge display, the effect is very good!

How to use:

1, Head area reference file Jquery.js,photorevealer.js,datouwang.css

2, add <!--code in the file to start--><!--code end--> area code

3, the number of pictures can be free increase or decrease, add or delete <td></td> can

4, if the picture information more, need more space, can modify the number of the 36th line in the Photorevealer.js

Core code:

$ (document). Ready (function () {$ ('. Photo_slider '). each (the function () {var $this = $ (this). addclass (' Photo-area ');
  var $img = $this. Find (' img ');
     
  var $info = $this. Find ('. Info_area ');
   
  var opts = {};
    $img. Load (function () {OPTS.IMGW = $img. Width ();
  OPTS.IMGH = $img. Height ();
   
  });
  OPTS.ORGW = $this. Width ();
   
  Opts.orgh = $this. Height ();
   
  $img. css ({marginleft: " -150px", MarginTop: " -150px"});
 
  var $wrap = $ (' <div class= ' photo_slider_img ' > '). Append ($img). Prependto ($this);
   
  var $open = $ (' <a href= "#" class= "more_info" >more info ></a> "). Appendto ($this);
   
  var $close = $ (' <a class= ' close ' >Close</a> '). Appendto ($info);
  OPTS.WRAPW = $wrap. Width ();
   
  Opts.wraph = $wrap. Height (); 
    $open. Click (function () {$this. Animate ({WIDTH:OPTS.IMGW, Height: (opts.imgh+30), BorderWidth: "10"
         
    }, 600);
     
    $open. fadeout (); $wrap. Animate ({Width:oPTS.IMGW, HEIGHT:OPTS.IMGH}, 600);
     
    $ (". Info_area", $this). FadeIn ();
     
    $img. Animate ({margintop: "0px", marginleft: "0px"}, 600);
  return false;
   
  });
     $close. Click (function () {$this. Animate ({WIDTH:OPTS.ORGW, Height:opts.orgh, BorderWidth: "1"
     
    }, 600);
     
    $open. FadeIn ();
     
      $wrap. Animate ({WIDTH:OPTS.WRAPW, height:opts.wraph}, 600);
 
    $img. Animate ({margintop: " -150px", MarginLeft: " -150px"}, 600);
    $ (". Info_area", $this). fadeout ();
  return false;
   
});
 
}); });

The above is the entire code of this article, I hope you can enjoy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.