Files
edx-platform/common/static/js/src/CSS3_workarounds.js
Syed Ali Abbas Zaidi 5549db4d80 fix: migrate remaining eslint-config-edx (#31760)
* fix: migrate remaining eslint-config-edx

* refactor: updated eslint rules according to eslint-config-edx-es5

* refactor: add custom rules to suppress unnecessary eslint issues

* refactor: add custom rules to internal eslint configs

* fix: fix all indentation issues

* chore: update lock file
2023-03-02 16:16:50 +05:00

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