Files
edx-platform/common/static/js/src/CSS3_workarounds.js
2016-04-22 19:09:31 +05:00

18 lines
509 B
JavaScript

// 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 browser 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 () {
pointerEventsNone('.is-disabled', document.body.styles);
});