Jeffrey Kretz ha scritto:
Another way would be to use the ctrlKey property of the Click event:

$('#element').click(function(e)
        {
                if (e.ctrlKey)
                {
                        do_something();
                }
        });

jQuery also normalizes this into the metaKey attribute which detects the CMD
key on a Mac:

$('#element').click(function(e)
        {
                if (e.metaKey)
                {
                        do_something();
                }
        });
Very cool, thank you all.

--
gianiaz.net - Giovanni Battista Lenoci P.le Bertacchi 66 23100 Sondrio (SO) - Italy

Reply via email to