CSS3_workarounds.js 535 Bytes
Newer Older
1 2 3
// A file for JS workarounds for CSS3 features that are not
// supported in older browsers

4
var pointerEventsNone = function(selector, supportedStyles) {
5
	// Check to see if the browser supports 'pointer-events' css rule.
6 7
	// If it doesn't, use javascript to stop the link from working
	// when clicked.
8 9 10 11 12
    $(selector).click(function(event) {
        if (!('pointerEvents' in supportedStyles)) {
            event.preventDefault();
        }
    });
13 14
};

15 16
$(function() {
    pointerEventsNone('.is-disabled', document.body.styles);
17
});