0

I try to put a image in a full screen, and also the image can be zoomable. I use for the zoom this jquery plugin http://www.jacklmoore.com/wheelzoom/ and for the full full screen, all options described here Full-screen responsive background image

In my tests, is possible make zoom into the image, but if resize the window, the image not resize and appear spaces between the borders.

I do not know if it's better to put the image in a div, and make this div fullscreen.

Community
  • 1
  • 1
user1783933
  • 1,105
  • 5
  • 13
  • 23

1 Answers1

0

If you provide us the fiddle we could be able to do something else but one option seems to be changing the image size on windows resize:

$(window).resize(function() {

    //in order to call the functions only when the resize is finished
    //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing
    clearTimeout(resizeId);
    resizeId = setTimeout(doneResizing, 500);       
});

function doneResizing(){
    var windowsWidtdh = $(window).width();
    var windowsHeight = $(window).height();

    //setting your image dimensions 
    $('#yourImage').css('height', windowsHeight );
    $('#yourImage').css('width', windowsWidtdh );

}
Alvaro
  • 40,778
  • 30
  • 164
  • 336