Solved

jQuery: Determine Zoom Level of Image

Posted on 2013-06-23
2
452 Views
Last Modified: 2013-07-03
Using jQuery, how can I determine the zoom level of an image?  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Demo</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">

$(document).ready(function() {
 $('img:eq(0)').attr('src', $('img:eq(0)').attr('src')).load(function () {
  alert('The zoom level of the image is: ');
 })
});

</script>
<style type="text/css">
html, body, p, img {
width: 100%;
padding: 0;
margin: 0;
}
</style>

</head>
<body>

<p>
 <img src="http://upload.wikimedia.org/wikipedia/commons/7/7b/Pic-du-midi-dossau.jpg" alt="" />
</p>

</body>
</html>

Open in new window

0
Comment
Question by:hankknight
2 Comments
 
LVL 15

Assisted Solution

by:Jagadishwor Dulal
Jagadishwor Dulal earned 200 total points
ID: 39270334
I hope you will be able to make it see reference
http://www.elevateweb.co.uk/image-zoom/examples
0
 
LVL 4

Accepted Solution

by:
ramyajanarthanan earned 300 total points
ID: 39277682
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now