Hi Cristopher,
I solved the view problem, now you can see it is working fine.
I have only a request.
I have a list of authors separated by coma and I need to hide the last coma of the list.
I added this code and it works fine on the first page:
(function toglicoma()
{
var spans = document.getElementsByClassName('blocco-autore');
var l = spans.length;
for (var i=0;i<l;i++) {
var ele = spans[i].getElementsByClassName('coma');
var lastEle = ele[ ele.length-1 ];
lastEle.parentNode.removeChild(lastEle);
}
return false;
})(jQuery);
But when I click on my load more button the function doesn't work on the second page.
How can I add the function to it?
Thank you so much.
Hi there,
This will be a complicated thing to do, as this part of the code that you have:
var spans = document.getElementsByClassName('blocco-autore');
Selects something that is not available when new content is loaded via Ajax.
Maybe you can use this jQuery method to run your function whenever an Ajax call is completed:
jQuery(document).ajaxComplete(function(event, xhr, settings) {
// Call toglicoma() again to remove the last comma from the list of authors
toglicoma();
});
I'm sure you will understand that this is going to a territory which is outside of our support scope as it is not directly related to Toolset anymore, and it is something related to your custom Javascript code.
Thank you.
Hi Christopher,
it doesn't work, but I solved the issue with another solution.
Thank you!