Hi @Markule
You need to add $(document).ready(function(){ });
if you want to load the function when the page is loaded. You can refer to following code
$(document).ready(function() {
$('td.ms-vb2 a').each(function() {
var linkUrl = $(this).attr('href');
var text = $(this).text();
$(this).hide();
$(this).parent('td').append('<input type="button" value="' + text +
'" onclick="Callbutton(\'' + linkUrl + '\')"></input>');
});
function Callbutton(url) {
window.location.href = url;
}
});
For more details
https://www.w3schools.com/jquery/event_ready.asp
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.