Closed dlee5400 closed 6 years ago
Did you load jQuery and instantiate Smooth Scroll? Please send me the configuration. You can see an example here: http://www.adamdelucia.com/docs/project/smooth-scroll/tutorial
Yes, i actually have at the top of the page
I get this message
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'smoothScroll'
when I insert the following
<script type='text/javascript' src="Scripts/jquery.smooth.scroll.js"></script>
<script type="text/javascript">
// Ready to call Smooth Scroll
$(document).ready(function () {
$.smoothScroll({
// Smooth Scroll configuration
});
});
</script>
Is there a parameter I need to pass the .smoothScroll function?
By default all anchor tags within the body are enabled. Although you can change that to be delimited by a container or class, no parameter is required. Please show me your configuration. Also, the order of operations must be 1) jQuery, 2) Smooth Scroll, 3) Instantiation.
It's a jQuery utility. Typical setup looks like this:
<script type="text/javascript" src="/Scripts/jquery.js"></script>
<script type="text/javascript" src="/Scripts/jquery.smooth.scroll.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.smoothScroll();
});
</script>
Thanks for editing your comment to include the configuration. Today I successfully tested a fresh NuGet installation that mirrors your original code sample. Based on the JS error you're getting it sounds like you might be loading jQuery twice. Do you have a Code Pen of your source or a staging site I can debug? Also, can you provide the browser and version where you encountered the error?
Were you able to resolve your issue with the information that I have provided or can I be of further assistance?
Sorry, yes I did.
Thank you, David
From: Adam De Lucia [mailto:notifications@github.com] Sent: Monday, February 26, 2018 11:49 AM To: offthehandle/jQuery-SmoothScroll jQuery-SmoothScroll@noreply.github.com Cc: David Lee dlee5400@hotmail.com; Author author@noreply.github.com Subject: Re: [offthehandle/jQuery-SmoothScroll] ASPX and Jq-SmoothScroll (#1)
Were you able to resolve your issue with the information that I have provided or can I be of further assistance?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Foffthehandle%2FjQuery-SmoothScroll%2Fissues%2F1%23issuecomment-368587556&data=02%7C01%7C%7C31f139789b8a4a98aa1a08d57d4128ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636552641163772942&sdata=uiupLscu05L%2B9Er2lj5DsmKMPVokW4LeQCtGNt3j2vE%3D&reserved=0, or mute the threadhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAGAv4cF84x49kZP7NlxrmtiPGUInnrBks5tYu5ygaJpZM4SQ1cI&data=02%7C01%7C%7C31f139789b8a4a98aa1a08d57d4128ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636552641163772942&sdata=7IXuaDlgJyIWZD9%2F96HApYPWDfI%2FuuXBAARiQyUbcxY%3D&reserved=0.
I am having trouble getting the smoothscroll to work in this environment. My page is an ASPX page and I have added your smoothscroll to a linkbutton. Here is the hookups: