Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready( function() {
- $('#div img').hover(
- function() {
- $(this).animate({ 'zoom': 1.2 }, 400);
- },
- function() {
- $(this).animate({ 'zoom': 1 }, 400);
- });
- });
- $("#ZoomIn").click(ZoomIn());
- $("#ZoomOut").click(ZoomOut());
- function ZoomIn (event) {
- $("#div img").width(
- $("#div img").width() * 1.2
- );
- $("#div img").height(
- $("#div img").height() * 1.2
- );
- },
- function ZoomOut (event) {
- $("#div img").width(
- $("#imgDtls").width() * 0.5
- );
- $("#div img").height(
- $("#div img").height() * 0.5
- );
- }
- var currentZoom = 1.0;
- $(document).ready(function () {
- $('#btn_ZoomIn').click(
- function () {
- $('#divName').animate({ 'zoom': currentZoom += .1 }, 'slow');
- })
- $('#btn_ZoomOut').click(
- function () {
- $('#divName').animate({ 'zoom': currentZoom -= .1 }, 'slow');
- })
- $('#btn_ZoomReset').click(
- function () {
- currentZoom = 1.0
- $('#divName').animate({ 'zoom': 1 }, 'slow');
- })
- });
- $('image').animate({ 'zoom': 1}, 400);
- <script>
- $(document).ready(function(){
- $('#ex1').zoom();
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement