I have been toying with page changing via AJAX so that users can use the player while changing pages with out the stream stopping and them having to press play again.
Currently I can change the page content using this little snip-it of code
This code retrieves the content of the new page and switches out the current content with the new content. This code can be expanded upon to allow it to change the page's tile, the sidebar menu and anything else that changes cross pages
I have been toying with page changing via AJAX so that users can use the player while changing pages with out the stream stopping and them having to press play again.
Currently I can change the page content using this little snip-it of code
jQuery.ajax({ type: "GET", url: "https://hiveradio.net/about", cache: false, dataType: "html", success: function(data) { newPageContent = jQuery("
").html(data).find('.site-content'); $('.site-content').fadeOut(250, function() { $(this).html(newPageContent); $(this).fadeIn(250); }); } });This code retrieves the content of the new page and switches out the current content with the new content. This code can be expanded upon to allow it to change the page's tile, the sidebar menu and anything else that changes cross pages