Hi I want to add a floating button on a specific page on my website.
I’ve tried this :
Custom > JavaScript in the Customizer:
jQuery(document).ready(function($) {
if( ! $(‘body’).hasClass(‘page-id-210’) ) {
$(‘Button Text’).appendTo(’.site’);
}
});
Custom > CSS
.site .floating-button {
position: fixed;
top: 10px;
left: 10px;
z-index: 10001;
}
But of course, it shows on every page. What do I have to change to set it to a specific page?