Reply To: Problem "back to top" button
Hi,
To solve the issue of Footer Back to Top Button, replace the code from line no. 150 in custom.js file of js folder with the below code
jQuery(document).ready(function(){
// hide #back-top first
jQuery(“#back-top”).hide();
// fade in #back-top
jQuery(function () {
jQuery(window).scroll(function () {
if (jQuery(this).scrollTop() > 500) {
jQuery(‘#back-top’).fadeIn();
} else {
jQuery(‘#back-top’).fadeOut();
}
});
// scroll body to 0px on click
jQuery(‘#back-top’).click(function () {
jQuery(‘body,html’).animate({
scrollTop: 0
}, 500);
return false;
});
});
});
jQuery(document).ready(function() {
jQuery(‘.cols-4 h5’).each(function(index, element) {
var heading = jQuery(element);
var word_array, last_word, first_part;
word_array = heading.html().split(/\s+/); // split on spaces
last_word = word_array.pop(); // pop the last word
first_part = word_array.join(‘ ‘); // rejoin the first words together
heading.html([first_part, ‘ ‘, last_word, ‘‘].join(”));
});
});
Regards
Grace Themes