Hi,
I create another thread because old thread is closed:
https://kriesi.at/support/topic/custom-id-for-layout-elements/
I have a solution for that:
(function ($) {
'use strict';
$(document).ready(function () {
// set id
(function () {
// console.log($('div[class*="js-set-id--"]'));
$('div[class*="js-set-id--"]').each(function () {
var $this = $(this);
var id = false;
var classes = $this.attr('class').split(' ');
for (var i = 0; i < classes.length; i++) {
var matches = /^js-set-id--(.+)/.exec(classes[i]);
if (matches != null) {
id = matches[1];
break;
}
}
if (id) {
$this.attr('id', id);
}
});
})();
});,
})(jQuery);
If you add js-set-id--element-id
class to an element then that element has id element-id
.
I hope it helps,
thanks.
Hey hayatbiralem,
Thank you for sharing, I have added Tags to help with searching.
Best regards,
Mike
Thanks :)
Hi hayatbiralem,
Thank you so much for sharing! I’m sure it can help others. I’ll close this thread now.
For your information, if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
Cheers!
Sarah