Disabling '#' animation

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
Sun Jan 15, 2017 10:05 pm
Reply with quote
Report this post
Hi!

One of my extensions (Ordasoft OS IMAGE GALLERY) uses hrefs with '#' pointer and specific divs. In effect after clicking a TAB (href="#xxxxxx") my page automaticly scrolls up to exact div (like menu action) and hides most of gallery...

Can you help me with this case? I just woult like to click 'href=#xxxxxx' whith no scrolling/animation effect.

Br,
Greg
User avatar
Fresh Boarder

GK User
Mon Jan 16, 2017 8:21 am
Reply with quote
Report this post
Hello,

I found some jQuery part of gk.scripts.js which is responsible for anchors animation. I assume that I need to put some custom condition in IF statement (shouln't I?).

Please give me some feedback how to "tunr off" this script for specific module or div.

Thanks.
Greg
User avatar
Fresh Boarder

GK User
Mon Jan 16, 2017 11:48 am
Reply with quote
Report this post
I am a king of the world!! :P

I have cracked it. A have just found closest (parent) div id and then put it in IF statement of function ("tabsy" is my unique ID of parent div):

Code: Select all
var parentId = $(this).closest('div').prop('id');
if(this.hash !== '' && parentId!=='tabsy') {
...
User avatar
Fresh Boarder

teitbite
Mon Jan 16, 2017 1:31 pm
Reply with quote
Report this post
Hi

Ok. That's a nice solution. I was going to propose remove Smooth Scrolling part of the script to let the 3rd party extension take over.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.