Limited Time Offer | Get 20% OFF on Themes Bundle. Use Coupon Code GRC20Buy Now

WordPress Website Templates

Find Professional WordPress themes Easy and Simple to Setup

Reply To: Problem "back to top" button

#629
Grace Themes
Participant

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

  • This reply was modified 6 years, 4 months ago by Grace Themes.