last day (15 days later) » 

11:30 AM
0
A: Jquery Scroll to Element does not animate my scroll

Deepyou are facing an issue because you have not added Jquery due to this anchot is performing its default action. i.e jump to the target element. $('a[href="#Information"]').on('click', function(event) { var target = $(this.getAttribute('href')); if (target.length) { event.preventDef...

 
This is the one I used <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jque‌​ry.min.js"></scrip‌​t> I also added the one you used, that also doesn't want it to work..
 
@RickJellema: Open the URL in browser and see?
 
In the snippet it works. The only part I am not getting is why it isn't working in my .Html file. I have a JQuery Lib linked in there via CDN. I took the CDN link from Deep and I searched a new one on google. Both didn't do the trick.
 
@Rohit Got that link from the Jquery site. I also took this one https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.mi‌​n.js this one shouldn't 404. Yet this one doesn't work either.
^ Also downloaded a Jquery Lib. and linked it to the HTML. Doesn't work either.
 
11:30 AM
Okay, see the characters %E2%80%8C%E2%80%8B automatically appends when we access it. paste URL in editor and remove these characters.
Check your updated fiddle: https://jsfiddle.net/n6tzgfuy/1/
 
So when I get 404ed I have to remove the %E2%80%8C%E2%80%8B? I also checked out the updated fiddle, I took the link of the jquery you put in the Fiddle and linked it into my .html file. yet didn't work
 
check console for any errors?
 
http://localhost/Rick/Projects/Bootstrap/Tuts/assets/js/ie10‌​-viewport-bug-wor‌​kar‌​ound.js Failed to load resource: the server responded with a status of 404 (Not Found) only error there is.. I tried fixing that an hour ago, but for some reason it does not see my ie10-viewport-bug-workaround.js I don't think this has anything to do with the scroller.
 
@RickJellema is the issue still persist, sorry i was getting ready to catch my flight.
 
@Deep Yes, the issue is still there and no worries! If you gotta go, you gotta go. :)
 
11:30 AM
@RickJellema thanks, now i can have a look right now what url are you using to load Jquery?
 
@Deep <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jque‌​ry.min.js"></scrip‌​t> This one
 
could you try with <script src="cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/…;
 
The fun part about this is that the link get's 404ed again. But if you take a look it's the same one as the one in your snippet.
Same result as with the other script links to jquery.
 
so when the page is loaded,can you check the developer console and check the jquery in the source tab?
 
Looking at the Jquery in the Src. tab right now.. I don't see anything odd
 
11:30 AM
hmm , by any chance are you using any other library which uses $ ? may be its conflicting
 
<head> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jqu‌​ery.min.js"></scri‌​pt‌​> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="ATMOX"> <meta name="author" content="ATMOX"> <script type="text/javascript" src="java/scroll.js"></script> <title>Steampunk :: New Vision</title> <link href="../../dist/css/bootstrap.min.css" rel="stylesheet"> <link href="cover.css" rel="stylesheet"> </head> this is everything I use.
 
@RickJellema there are some strange character when i copy this to my example, i have removed those and updated my snippet. Could you use the head section from there
 
@Deep Iused your head in the snippet and that also didn't help..
 
One last issue which i can think of is the file scroll.js. could you remove it once and try?
 
I removed the scroll.js script and saved the html file. refreshed the webpage and the function still works..
I also removed the #Information from anchor learn more. it seems it stopped jumping now.
 
11:30 AM
This is really strage. Have you tried to get rid of cache? Try in incognito mode once
 
I just tried incognito mode. also cleared cache. it seems to stop jumping when i remove the #Information from <a href="#Information">Learn more</a> it looks like it never used the scroll.js.
 
The jump is the default action of an anchor element and scroll.js is not required for the animate jquery function.
 
ah alright, i removd the scroll.js though and it just kept jumping untill i removed th href from the anchor
 
Could you share your complete code ?? Dropbox or something. will have a look
 
Sure, I'll do that when I get home after work
 
 
3 hours later…
2:19 PM
@dee
@Deep I got the dropbox link here. dropbox.com/s/v2dinopftsvs3fd/Public.rar?dl=0
 
2:49 PM
Great, let me have a look, i will reply back
 
3:17 PM
Alright, Take yer time.
 
 
3 hours later…
6:09 PM
looks like files are deleted in dropbox
 
6:20 PM
That's weird, will look into it real quick
 

  last day (15 days later) »