how can disable scroll efect in othe pages

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Oct 02, 2014 11:40 am
Reply with quote
Report this post
I am usin some extra plugins inside the articles. the pages are scrolling. it doesn't make sense for me. can i disable the scroll scripts.. except frontpage?
User avatar
Senior Boarder

GK User
Thu Oct 02, 2014 11:49 am
Reply with quote
Report this post
You would need to somehow create a javascript variable that on homepage gets one value and other in all other pages and then in gk.scripts.js set a condition depending on that value.
Sadly this is ad much as I can help... We don't support this kind of customisations.
User avatar
Moderator

GK User
Sun Oct 05, 2014 4:17 pm
Reply with quote
Report this post
i understood.
if i can't do it except frontpage, i could disable all website. because it causes problem. i can't use website like this.
all hastags "#" have same effect, scrolling down. how can i change this effect? how can is disable?
User avatar
Senior Boarder

GK User
Mon Oct 06, 2014 7:01 pm
Reply with quote
Report this post
You can either edit:
templates/gk_john_s/js/gk.scripts.js
file and remove this section:
Code: Select all
   jQuery('a[href^="#"]').on('click',function (e) {
      e.preventDefault();

      var target = this.hash,
      target = jQuery(target);
      if(this.hash !== '') {
         jQuery('html, body').stop().animate({
            'scrollTop': target.offset().top
         }, 1000, 'swing', function () {
            window.location.hash = target.selector;
         });
      }
   });

or you can leave this functionality only for menu, but to do that I would need an url to your site (then do not remove above code as small change will be required).
User avatar
Moderator

GK User
Wed Oct 08, 2014 11:28 am
Reply with quote
Report this post
thank you. i did it. it is ok.
but gk-header3 doesn't show now at the frontpage . is it for this deleted script?
User avatar
Senior Boarder

GK User
Wed Oct 08, 2014 11:31 am
Reply with quote
Report this post
if delete with the other lines, gk-header3 does work.
is it problem? i deleted this:
jQuery('a[href^="#"]').on('click',function (e) {
e.preventDefault();

var target = this.hash,
target = jQuery(target);
if(this.hash !== '') {
jQuery('html, body').stop().animate({
'scrollTop': target.offset().top
}, 1000, 'swing', function () {
window.location.hash = target.selector;
});
}
});
User avatar
Senior Boarder

GK User
Wed Oct 08, 2014 8:29 pm
Reply with quote
Report this post
I think you haven't deleted enough in first place - code snippet can be scrolled.
User avatar
Moderator


cron