Disable ctrl + mouse scroll on a webpage

How can I disable CTRL + mouse scroll on web page with jquery?

I want to disable zoom in and zoom out on my web page!

Answers


Yes you can do this :

$(window).keydown(function(event) 
{
    if((event.keyCode == 107 && event.ctrlKey == true) || (event.keyCode == 109 && event.ctrlKey == true))
    {
        event.preventDefault(); 
    }

    $(window).bind('mousewheel DOMMouseScroll', function(event) 
    {
        if(event.ctrlKey == true)
        {
            event.preventDefault(); 
        }
    });
});

This will only work for Firefox, Chrome and Opera. It will not work with Internet Explorer.


This is not possible.

Instead, you should design your page to support zoom.


Need Your Help

Reading archive using 7-zip

c# .net zip 7zip

I'm trying to find a way to read the contents/ file names of a zipped file, unzip the files and then create a text file with a list of all the files unzipped.

Bootstrap: -nav-fixed-top have display errors in chrome

javascript jquery css google-chrome twitter-bootstrap

I'm trying to build an CV for myself and having the following error:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.