Solved

pan and scan image using Jquery

Posted on 2011-03-23
1
751 Views
Last Modified: 2012-05-11
Let’s say we have a 1000x1000px  image and we want to display 400x400px of that image in a web browser. I want the user to be able to use their mouse cursor to “scan around” the image and view different pieces of it.   Write a script using jQuery that will allow the user to do that.
0
Comment
Question by:stargateatlantis
1 Comment
 
LVL 3

Accepted Solution

by:
Maximus5684 earned 500 total points
ID: 35201879
Use the jQuery UI plugin called Draggable:

http://jqueryui.com/demos/draggable/

Create a container that is the veiwport size that you want. Put the full-sized image inside that container and set the container to have overflow: hidden. Then, using jQuery, select the image and add $.draggable().
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to count occurrences of each item in an array.

910 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

24 Experts available now in Live!

Get 1:1 Help Now