My problem is that i have already made implementation of java script Shuffle button but only working in specific url which i will put into line document.location.href i used for this example somefile.html.
jQuery('body').on('click', '#shuffle-button', function() {
gtag('event', 'Shuffle', {
'click': 'true'
});
ga('send', 'event', 'Shuffle', 'click', 'true');
document.location.href = '**/somefile.html**';
}).on('click', '#station-share-toggle, #station-share-close', function() {
$('#station-share-buttons').toggle();
}).on('click', '.jp-share-button', function() {
window.open($(this).attr('href'), "share", "width=500, height=500");
return false;
});
So into same folder where is located somefile.html there is 350+ other .html files which i would like to make it when Shuffle button is clicked to transfer to random of that 350+ .html files.
This example only work for somefile.html. What i have to do to or where is my mistake I would be glad if someone has option to make it functional.