CSS3_workarounds.js 508 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// A file for JS workarounds for CSS3 features that are not
// supported in older browsers

var pointerEventsNone = function (selector, supportedStyles) {
	// Check to see if the brower supports 'pointer-events' css rule.
	// If it doesn't, use javascript to stop the link from working
	// when clicked.
	$(selector).click(function (event) {
		if (!('pointerEvents' in supportedStyles)) {
			event.preventDefault();
		};
	});
};

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