Solved

pan and scan image using Jquery

Posted on 2011-03-23
1
749 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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
The viewer will learn how to count occurrences of each item in an array.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

762 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

6 Experts available now in Live!

Get 1:1 Help Now