I am author of the WordPress plugin Tipu Scroll To Top. Can anyone please that how can I allow users to see the live changes on the setting page. Currently, I am using the jQuery for only the scroll to top button and it is as below
(function($){
$(window).scroll(function(){
if ($(this).scrollTop() < 100) {
$('#stt_container') .fadeOut();
} else {
$('#stt_container') .fadeIn();
}
});
$('#stt_container').click(function(){
$('html, body').animate({scrollTop:0}, 'slow');
return false;
});
})( jQuery );
Take a look at Eager: https://eager.io/developer/features
You can create an Eager plugin, and then export it as a WordPress plugin which will support live preview: https://eager.io/developer/cms
You can try out an example plugin here: https://wordpress.org/plugins/drift-by-eager/