Giter Site home page Giter Site logo

elevator.js's Introduction

๐Ÿšจ๐Ÿšจ๐Ÿšจ Best Friend Alert ๐Ÿšจ๐Ÿšจ๐Ÿšจ

Hi there, I'm Tim Holman, a creative developer who loves to dabble in the weird and wonderful... Especially the weird.

๐Ÿ”ฅ If you like my stuff, please consider sponsoring me ๐Ÿ”ฅ๐Ÿ”ฅ

Some of my many open source projects are:

elevator.js's People

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  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

elevator.js's Issues

Chrome Extension

Open to a chrome extension? GF just said she would love to use this when looking online for clothes lol.

Sound

Hey, my friend i was searching some libs on cdnjs then i saw elevator.js so when i goto example and clicked on back to top suddenly music started and i was putted earphones and my earphones are very loud i got feeling like heart attacked

Example page is not long enough

As the title say, I'd like the example page to be even longer! There isn't enough time to fully embrace the awesomeness which is elevator.js.

No Git tags in GitHub repo

Hey @tholman,

I'd like to host your library, elevator.js on cdnjs โ€” It is one of the most famous free and public web front-end CDN services which is used by ~1,143,000 websites worldwide.

The git auto-updater for cdnjs relies on git tags to recognize a release version and automatically update the library in the cdnjs repo.

If it's not too much to ask, can you please add git tags for this repo, say 1.0.0?

Note: Even though this package is available on npm and I'll be using npm for the auto-update code, I'm suggesting the addition of release tags as a fail safe method.

Needs easing

A real elevator is slow to start and finish for comfort, but fast in the middle. You should add some easing :)

Don't elevators go down, too?

I understand the principal point behind a scroll-to-top mini-library... but it seems (on the thought level) that it would be trivial to implement scroll-to-bottom functionality! I prefer the stairs, but If I use an elevator, I probably use it both ways.

Can't have just one audio

I wanted endAudio but when I use just endAudio it produces a javascript error assuming I also want a mainAudio. I currently have mainAudio set to empty string but allowing just one would be better I think. Thanks.

Tabbing issue #2

If you click "scroll to top" but then tab out while the music is playing, the music will keep playing despite the page having reached the top. Then when you switch back to the page, it will abruptly stop with a "ding", but youll still be at the bottom (of the page).

Chromebook installation

How does one go about installing this on a Chromebook? Will there be a easy-to-use browser extension available?

Strange behavior when coupled with the Home button

Hey Tim,

I've been looking into using your library on a site that I'm setting up, and in doing research on the problem, I came across several suggestions of using the Home button on the keyboard in conjunction with this library. After setting up a test page, I tried using the Home button, and it bypassed the normal behavior and simply moved to the top of the page immediately. Do you have any suggestions as to how I could suppress this behavior? Perhaps some options in the library to intercept the Home button and use it to trigger the elevator behavior? I feel that this library would give my site the responsiveness and interactivity that it needs to really stand out.

Thanks in advance,

  • Shotgun Ninja

Setting volume

Hey is there any way to set the volume of the mp3?

I tried reducing it's volume, but it doesn't seem to work in my Opera.

Kind Regards,
Dennis Bitsch

.back-to-top class is hidden by the ad-blocker

I've noticed that the nice "go to top" button has been hidden by the adblocker because of 'back-to-top' class it has. Can this class name be changed to something more ad-blocker friendly?

Scrolling within a element?

Hi loved the plugin, since i am a beginner in javascript, i was trying to attach the plugin to a element within the page that has overflow scroll. (long content div && body height 100%). I was wondering how do i about doing that?

Progressive enhancement

Why not use the 'old fashioned way' of providing a link with a #top anchor?
That way, this at least degrades nicely for those not inclined to use JS.
As #top is a specialcase anchor, you wont need to name/id the body to make this work.

Doesn't allow multiple variations of elevator options on a single page

I'd fix this if I weren't on mobile, but basically - because the configuration options are not instance variables, whatever "Elevator" that is created last overrides the configuration options for all previous Elevators. For example, by doing the following:

        var elevator1 = new Elevator({
            element: $('#button-one'),
            mainAudio: './music/elevator-music-one.mp3', // Music from http://www.bensound.com/
            endAudio:  './music/ding-one.mp3',
            duration: 1000
        });

        var elevator2 = new Elevator({
            element: $('#button-two'),
            mainAudio: './music/elevator-music-two.mp3', // Music from http://www.bensound.com/
            endAudio:  './music/ding-two.mp3',
            duration: 5000
        });

elevator will have the configuration of elevator2 even though I really wanted two different behaviors.

Thanks for making this, I had a good laugh. :)

Don't ignore user scroll

If the user clicks the trigger to scroll up, but during the upscroll desides that he wants to scroll in another direction / stop the scroll, the user should be able to do so by scrolling. elevator.js should then stop the scrolling.

Support reduced-motion animations

First response: this is awesome! Until I get dizzy, a mild headache, and feel like I might barf ๐Ÿคฎ

It would be rad if there was a reduced-motion animation (maybe jump points with subtle fades/wiggles?), that automatically kicked in on matchMedia('(prefers-reduced-motion)')

Problem when browser lost focus

Hello
When click back to top and then lost focus from browser, elevator goes to first of page and music stopped. Can anybody fix that?

No "ding" in Mobile Safari

Hey, I know this is mostly a gag so you might not care, but you don't get the "ding" in Mobile Safari. My guess is that it's the fact that iOS requires user intervention to play audio on websites? I'm not sure if there's a way around it.

Cool

Cool, but I find the demo on the homepage awkwardly slow.

Module is not defined

Uncaught ReferenceError: module is not defined
at elevator.js:265
(anonymous) @ elevator.js:265

Ding

I feel like the elevator needs to ding at the top. Otherwise, how does the user know when to get off? Lovely product otherwise!

Music license?

Is the music licensed as MIT too? Given that it is included in this repo I assume it is, but it would help if that was clarified.

No "close door" button

I'd really like to use this library, but without a force close door button I'm afraid it has no place in our application.

Audible signals are not ADA compliant

Summary: An elevator car arriving at its topmost floor will always be traveling next to a lower floor. Therefore upon arrival, the elevator car should always signal with two alerts or announcement including the word "down".

Developers needing to meet Section 508 compliance standards are unable to use elevator.js in its present form.

US ADA guidelines for elevators require audible signals at each individual entrance; typically these signals are installed withinin the light assembly for each car. Please see the relevant ADA guidelines below.

https://www.ada-compliance.com/ada-compliance/ada-elevators.html
4.10.4 Hall Lanterns. A visible and audible signal shall be provided at each hoistway entrance to indicate which car is answering a call. Audible signals shall sound once for the up direction and twice for the down direction or shall have verbal annunciators that say "up" or "down."

Though I have focused on US-centric guidelines; there is a high degree of similarity worldwide among accessibility standards.

Also if I might make a personal request; and this is just my opinion -- I find the music to be a little bit too loud for an elevator.

If you are amenable to this change, I would be happy to submit a PR.

Tabbing away breaks

  1. Go http://tholman.com/elevator.js/
  2. Scroll down.
  3. Click Back to Top. Music plays.
  4. Open new tab and go to your favorite site that's SFW.
  5. Music still plays on the other tab.
  6. Yea feels so good~
  7. Come back to elevator page.
  8. Ding!
  9. But still at the bottom.

Volume settings

Can you add an opportunity to tune the volume cause if a user has high volume settings it can really bother.. Thanks

Best project 2020

Hello,

I just want to point out that this is to me the best project I've seen during 2020 so far. Keep on rockin'!

speed instead of duration?

Is there a way to set the scrolling-speed, independently from the scrolling-distance? With a fix duration the scrolling-speed is very different at long and short sites.

show and hide element

Hi!
It's amasing stuff! Really. But I need some your help.
How I can hide the button with elevator when it's top of page? I mean, when is top of page I need to hide elevator button, else show it.

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.