Files
edx-platform/common/static/js/src/CSS3_workarounds.js
2016-08-08 15:59:18 -04:00

18 lines
535 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);
});