Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7090143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:00:35+00:00 2026-05-28T08:00:35+00:00

I have an image! When the mouse hovers over the image, is it possible

  • 0

I have an image! When the mouse hovers over the image, is it possible for jQuery (or CSS!) to “detect” an area around the mouse, capture the image underneath, and then zoom that image?

So! Unlike the jQuery zooms I’ve seen online, where there are two images – small and large – this one doesn’t use any fancy algorithm to work out where the mouse is in relation to the small, and then show that section of the large.
Instead, this would presumably use a fancy algorithm to catch the area around the mouse, and then blow it up!

If there is a plugin that does this, that would be wizard. If not, does anyone know if it is possible to :

a. capture the screen around the mouse using jQuery/JavaScript/CSS/HTML5?
b. blow up a captured image using jQuery?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:00:36+00:00Added an answer on May 28, 2026 at 8:00 am

    Here is some code I wrote a while ago to “zoom” thumbnail images for a slideshow:

    $(function () {
        $('#container-id').bind('mousewheel', function (event, delta) {
            event.preventDefault();
            var sc = $.data(this, 'scale');
            if ((delta == 1 && sc < 5) || (delta == -1 && sc > 1)) {
                sc += delta;
                $.data(this, 'scale', sc);
                $(this).find('img').css({
                    WebkitTransform : 'scale(' + sc + ')',
                       MozTransform : 'scale(' + sc + ')',
                        MsTransform : 'scale(' + sc + ')',
                         OTransform : 'scale(' + sc + ')',
                          Transform : 'scale(' + sc + ')'
                });
            }
        }).bind('mousemove', function (event) {
            //only run the code if the thumbnail is zoomed in, otherwise there is no point in doing these calculations
            var sc = $.data(this, 'scale') || 1;//scale
            if (sc > 1) {
                var $this = $(this),
                    X  = (typeof(event.offsetX) == 'undefined') ? (event.pageX - $this.offset().left) : (event.offsetX),//current cursor X position in bullet element
                    Y  = (typeof(event.offsetY) == 'undefined') ? (event.pageY - $this.offset().top) : (event.offsetY),//current cursor Y position in bullet element
                    w  = 100,//width of a thumbnail
                    h  = 100,//height of a thumbnail
                    nX = ((w / 2) - X),//new X
                    nY = ((h / 2) - Y),//new Y
                    tf = 'translate(' + (nX * (sc - 1)) + 'px, ' + (nY * (sc - 1)) + 'px) scale(' + sc + ')';//transform string
                $this.find('img').css({
                    WebkitTransform : tf,
                       MozTransform : tf,
                        MsTransform : tf,
                         OTransform : tf,
                          Transform : tf
                });
            }
        }).bind('mouseleave', function () {
            //reset .has-thumb element on mouseleave
            $.data(this, 'scale', 5);
            $(this).find('.thumb-image').css({
                WebkitTransform : 'translate(0, 0) scale(1)',
                   MozTransform : 'translate(0, 0) scale(1)',
                    MsTransform : 'translate(0, 0) scale(1)',
                     OTransform : 'translate(0, 0) scale(1)',
                      Transform : 'translate(0, 0) scale(1)'
            });
        });
        $.data($('#container-id')[0], 'scale', 5);
    });
    

    Sample HTML looks like this:

    <div id="container-id">
        <img src="..." />
    </div>
    

    And some CSS to wrap-it-up:

    #container-id {
        width  : 100px;
        height : 100px;
        overflow : hidden;
    }
    #container-id img {
        width  : 100px;
        height : 100px;
    }
    

    Here is a demo: http://jsfiddle.net/Bbsze/1/

    If you are interested in this code I can write-up some documentation to make it a bit more clear. Also note that this code leverages the CSS3 transform property so old browsers would need a little more code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following jQuery code to replace an image when you hover over
I have found this script that expand image when mouse is over, but when
I have image, and on mouse over it fades in two arrows (on the
I have an image that is presented after you hover over with your mouse.
I have the following xaml for changing the image for WPF button when mouse
i have list of images and on mouse over there is option box shows
I'm trying to figure out if this is possible.. I have an image map
I have six menu options in my webapp, and when the user hovers over
I have been looking a script that expands a photo when mouse is over.
Is it possible to have a partially transparent background/image (png logo with shadow) positioned

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.