Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sticky list dividers in jQuery Mobile?

Is there a way to make the jQuery Mobile List divider header be fixed / sticky at the top of the page until the next letter or list divider comes up and takes its place?

I have found already something like this: https://github.com/jquery/jquery-mobile/blob/master/experiments/scrollview/lists-divider.html but demo doesn't work, and when I had implemented this code, it also doesn't work.

like image 242
mrzepinski Avatar asked Feb 20 '23 06:02

mrzepinski


2 Answers

I'm searching for a plugin to do the same, also for the list dividers on jquery.mobile. Found the Sticky plugin.

It works great on firefox, but dividers does not stick to the top on Chrome or Safari browsers, probably because of the complex menu structure jquery mobile creates. Will try to figure it out.

like image 161
Arik Avatar answered Mar 04 '23 07:03

Arik


You can use this jQuery plugin on GitHub. There's also a showcase article about it, showing it as the iOS contacts app.

The plugin allows you to choose whatever selector you like as the header's. See this example for more details.

like image 33
Sam Sehnert Avatar answered Mar 04 '23 05:03

Sam Sehnert