Mac prevent default for Command key + Click

// Mac prevent default for Command key + Click
$(document).bind('contextmenu click', function(e) {
    // 1 left click
    // 2 middle click
    // 3 right click
    if (e.which === 3)
    {
        // show context menu
        return e;
    }
    else
    {
        // don't show context menu
        return false;
    }
});

Possible bug with input type=”file”

Advertisements

Dynamically getting browser window size with jQuery

After a long search I found that jQuery code.

<html>

<head>

<script type=”text/javascript” src=”jquery.js”></script>
<script type=”text/javascript”>

$(window).resize(function () {
$(‘#msg’).text(‘Browser (Width : ‘ + $(window).width() + ‘ , Height :’ + $(window).height() + ‘ )’);
});

</script>
</head>
<body>
<div id=”msg” style=”border:solid 1px red;”></div>

</body>

</html>

It’s working.