Last active
December 14, 2017 19:46
-
-
Save pastyrMisha/952c69e5c7c7e2e28e5c4ec4091f9cca to your computer and use it in GitHub Desktop.
эффект приближения картинки
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p id="test"> | |
<img src="https://m-strana.ru/upload/medialibrary/7d6/7d634a1f32fa6122491517638a3e2fd9.jpg" | |
alt="изображение" title="изображение" id="img" width="200"> | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$("#img").bind("click", function (event) { | |
$(event.target).parent().css("text-align", "center"); | |
$(event.target).animate ({ | |
width: $(event.target).width() * 5, | |
width: $(event.target).height() * 5, | |
}, 3000); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment