As of 2017, is there a way to implement a cross-browser and mobile inclusive custom scrollbar, that supports events for an infinite-scroll (in case of a plugin)?
This question has been asked and answered here, however, this was 5 years ago with the accepted answer last updated on 2014, so I'm hoping for an up-to date answer to this subject.
Some things i have tried:
Custom Css (not compatible with all browsers, i'm testing for IE10+ and other modern browsers)
Most starred git project perfect-scrollbar (Scrollbar won´t be displayed on mobile)
Sly (2.7k stars on github) - (seems good, not tested for mobile though
jquery.nicescroll - seems like it's not supported anymore
I use Custom Content Scroller aka mCustomScrollbar
http://manos.malihu.gr/jquery-custom-content-scroller/
I tested on mobile and many browsers and work perfectly... btw CSS is not implemented on all browsers yet... I think that CSS is not good choice to change scrollbar appearance at this moment...
What can you do is check some repositories, drill dip in code and decide if you want to rewrite it in your own manner or just reuse it as is.
Below some links to github scrollers maybe first on is mostly suit.
simplebar
jquery custom scroller
Maybe if you will provide more details with live example and expected devices, you will get more answers.
Related
I have been searching but have not come to an answer.
Is there a way to detect the event which OpenLayers enters FullScreen/exits FullScreen? In short, i need to toggle classes of some divs. I tried adding events to the buttons, but then it doesn't work if they press escape instead.
Thanks.
The comment suggesting using 'screenfull' is a good option for now. screenfull is just a wrapper that smooths out the cross browser implementation issues of the fairly new 'Fullscreen API'. Until the browsers have fully implemented the standards for these events, that little wrapper is a good way forward.
If you are just wanting to style things differently, there is a CSS pseudo selector for that - :fullscreen. No JavaScript required! You can read the documentation for it on MDN and there is also a great example. Take special note of the need for the vendor prefixes and the fact that some browsers say full-screen rather than the standard fullscreen. The various mix of selectors you'll need seem to currently be:
:-moz-full-screen - Gecko based browsers
:-ms-fullscreen - IE/Edge
:-webkit-full-screen - WebKit based browsers
:fullscreen - Standards compliant browsers
I need to add horizontal scrollbar. It should have same interface for all browsers and compatible with android, windows, tablets etc.
Customize the scrollbar and make it cross-browser it's still complicated with full CSS.
Webkit-based browser make the customisation possible with CSS only as you do. But your snippet doesn't work even on Firefox, for example.
Maybe you should have a look to some JS plugins, in particular this one what I had to use in the past.
Demo
Don't be afraid with the theme, you can create yours. You'll find a tutorial to do it here.
Hope this helped you, even if it's not a full-CSS solution but this is the only way I know to deal with stylised scrollbar.
I've created a website using SUPERSCROLLORAMA plugin. I wasn't aware of the problems with parallax scrolling on iPad and iPhone. I've found out a little bit to late, and I'm thinking about the ways to solve this.
If I understand correctly, events are disabled on this devices while scrolling. So will I be able to make website act as it should, if I disable the native scrolling and implement another one, via JavaScript plugin?
I've already disabled the original scrolling using Alnitak's answer from this question. I've tried to find some plugins to activate scrolling again, but the problem is, it has to be binded to the document since animations are fired there... Do you know the plugin that will do the trick? Is my solution even correct, or there is no solution for my case, I need to rewrite the script from scratch?
You can use parallax scrolling plugin that works on mobile browsers (iOS too).
Have a look at Skrollr. It doesn't depend on any other library, it has optional mobile js file and is very easy to use. Just read the documentation.
I have recently used a JQuery plugin called cycle to create slides of general HTML content in my homepage (www.inspirastudios.com). Everything looked OK in Firefox and Chrome but while browsing the site with a client I got the ugly surprise of Internet Explorer 7 rendering my slides within an ugly gray background. Do you know:
how to solve this, or
any decent javascript slideshow/carousel/slider library that supports general HTML (not only images), previous and next slide activation buttons?
Nivo slider has all the features that you are looking for. http://nivo.dev7studios.com/
You might be facing the following problem: jquery cycle IE7 transparent png problem
I know there are a number of frameworks to help make web applications on Mobile Safari/Webkit look and behave like native applications (eg, jQTouch), but are there any more light-weight libraries that help out at a slightly lower-level?
eg, I might want to add some animations on certain touch events to reproduce an iPhone style swipe.
I don't want to create an iPhone web application as such, just enhance an existing site with a few special touch events.
It's not so difficult to create this stuff by directly using the touch events that the device provides, but some of the iPhone animation styles are quite complex to reproduce. eg, the bounce when you get to the end of a scroll bar, etc... Just wondering if anyone has done the work and wrapped it up into an open source library.
This doesn't answer your question completely, but since you mentioned bounce scrolling specifically, TouchScroll was just released on Tuesday.
I am looking for the same thing, JavaScript frameworks free from IE stuff..
So far
XUI
http://code.google.com/p/xui-js/
SLY
http://github.com/digitarald/sly
Coming Soon
jQuery for touch devices (not jqtouch) http://jquerymobile.com/2010/08/announcing-the-jquery-mobile-project/
http://zeptojs.com/ is all you want.
It's jQuery trimmed for webkit mobile. Excellent library with (brand new) great documentation. Handles ajax, dom selection, touch events. Does not have UI components.
Very lightweight.