Code Monkey home page Code Monkey logo

animatescroll.js's Introduction

twitter_cover_upgrade_presentation

Hi there ๐Ÿ‘‹

I am Ram and

  • ๐Ÿ”ญ Iโ€™m currently working on Presentify
  • โœ๏ธ I blog occasionally at blog.rampatra.com
  • ๐ŸŒฑ Iโ€™m currently learning macOS development and SwiftUI
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on marketing Presentify
  • ๐Ÿ’ฌ Ask me about apps, start-ups, indie developement, blockchain, crypto, or anything tech
  • ๐Ÿ“ซ How to reach me: Twitter
  • ๐Ÿ˜„ Fun fact: My name is derived from an Indian God, has nothing to do with computers

Ram's github stats

GitHub followers ย  Twitter Follow

animatescroll.js's People

Contributors

gitter-badger avatar rampatra avatar ramswaroop avatar srph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

animatescroll.js's Issues

Firefox & IE Not Scrolling

When I try to run the Animatescroll function I get this error message: $($str).animatescroll is not a function @ http://localhost/:17

the function in js that im calling is : $($str).animatescroll({scrollSpeed:300});

It works perfectly in webkit browsers like safari.
Thanks for your help.

Calculation from top

Hello,
I am using the plugin for a dynamic search list with a dropdown block. I wanted to bring the dropdown block to the user view perfectly. So I used your plugin and it works fine. But each time it goes to the top and then returns to the block. Is there a way to overcome this.

Update on usage (data-animate-scroll)

Instead of

<a onclick="$('[jquery selector]').animatescroll([options]);">Go to Element</a>

We might as well make use of data-animate-scroll in which the library listen for on-click events on elements having the data attribute? For example,

<a href="#" data-animate-scroll-target=".that-element" data-animate-scroll-ease="swing"></a>

[enhancement] Add missing bower.json.

Hey, maintainer(s) of ramswaroop/animatescroll.js!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library ramswaroop/animatescroll.js is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "ramswaroop/animatescroll.js",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

Element option not working when target id isn't a direct child of element

When using element option and the target id isn't a direct child of element.

<div class="container-with-scroll">
  <h2 id="working-target"></h2>
  <a><img id="target"></a>
</div>
  // This working great :
  $('#working-target').animatescroll({ element: '.container-with-scroll', padding: 20 });
  // This not working :
  $('#target').animatescroll({ element: '.container-with-scroll', padding: 20 });

Problem is here https://github.com/ramswaroop/animatescroll.js/blob/master/animatescroll.js#L162
The use of this.parent() causing the issue because the parent of target is <a> not the .container-with-scroll.

The fix:

  $(opts.element).stop().animate({ scrollTop: this.offset().top - $(opts.element).offset().top + $(opts.element).scrollTop() - opts.padding}, opts.scrollSpeed, opts.easing);

I can do a PR if needed.

Script stop working when i have async attribute in jquery and animatescroll

When i have async attributes in js and jquery won't load before animatescrol, it throws an Uncaught ReferenceError error: jQuery is not defined at js / animatescroll.min.js: 2 and the script stops working. When the user tries to use the navigation later only errors pops up: Uncaught TypeError: $ ( ...). animatescroll is not a function at HTMLAnchorElement.onclick.

Target multiple classes or id with 1 anchor link

Hello,
Is it possible to do this? Basically, as you click, it scrolls to the ids or classes specified. $('#SECTION1, #SECTION2, #SECTION3').animatescroll({scrollSpeed:1000,easing:'easeInOutBack'});">Scroll to Multiple Elements

Padding option

Hi!
Great plugin, especially for its simplicity!

I have a small problem or am I doing something wrong. I have a script to keep the DIV where I have the navigation, always at the top of the window, when I scroll, I need to always leave space for that div.
Then I thought using the padding option, however it only works on the second click. The first click it scroll to the exact position of the element, and only when I give another click is that it sets the padding.
I try to invoke the function that keeps my navigation on top with the option "onScrollEnd", but it didn't work either.

It is normal behavior, or should be something else?
Thank you very much!
Jose

multiple click

Please add method stop() before jQuery method animate() in your plugin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.