11.04.2022, 05:34
Custom name cannot be accessed from Custom JS at the moment. This can be done via Additional classes. This code will look for all elements where class list contains rotate-XYZ (where XYZ is an angle value in degrees). No custom CSS is needed for this solution, the rotation is applied by the code itself..
Code:
$(function(){
$('[class*=rotate-]').each(function(index, el) {
var match = el.className.match(/rotate\-(\d+)/);
el.style.transform = 'rotate(' + match[1] + 'deg)';
});
});