Giter Club home page Giter Club logo

ioslist's Introduction

iOSList 2.0.6

iOS-style sticky headers with jQuery

iOSList is a jQuery plugin that creates iOS-style sticky headers similar to those seen in the Music and Contacts apps on Apple devices. It is tested to work in the following browsers:

  • Mac (Chrome 10+, Safari 4+, Firefox 3.5+, Opera)
  • PC (Chrome 10+, Safari 4+, Firefox3.5+, Opera, IE6+)
  • iOS 3+ (Safari Mobile)
  • Android 2.2+ (Chrome, Firefox 4, Opera 11)

Getting Started

Download the production version.

In your web page:

<!-- in the head tag -->
<link rel="stylesheet" href="css/jquery.ioslist.css" />

<!-- somewhere in the body tag -->
<div id="list1">
    <div class="ioslist-group-container">
        <div class="ioslist-group-header">A</div>
        <ul>
            <li>Afghanistan</li>
            <li>Akrotiri</li>
            <li>Albania</li>
            <li>Algeria</li>
            <li>American Samoa</li>
        </ul>
    </div>
    <div class="ioslist-group-container">
        <div class="ioslist-group-header">B</div>
        <ul>
            <li>Bahamas, The</li>
            <li>Bahrain</li>
            <li>Bangladesh</li>
            <li>Barbados</li>
            <li>Bassas da India</li>
        </ul>
    </div>
    <div class="ioslist-group-container">
        <div class="ioslist-group-header">C</div>
        <ul>
            <li>Cambodia</li>
            <li>Cameroon</li>
            <li>Canada</li>
            <li>Cape Verde</li>
            <li>Cayman Islands</li>
        </ul>
    </div>
</div>

<!-- near closing body tag -->
<script src="js/jquery.min.js"></script>
<script src="js/jquery.ioslist.js"></script>
<script>
        $(function(){
            $("#list1").ioslist();
        });
</script>

Documentation

refreshElements

$('.my-list').ioslist().on('ajax:success', function() {
  // after adding new elements to the DOM
  $(this).data('instance').refreshElements();
});

Configuration Options & Their Defaults

@TODO

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.

Also, please don't edit JS files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!

Release History

Release History

License

Copyright (c) 2014 Brian Hadaway Licensed under the MIT license.

ioslist's People

Contributors

asross avatar brianhadaway avatar bryant1410 avatar graingert avatar mrondon 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

ioslist's Issues

-webkit-overflow-scrolling:touch breaks it

The scrolling action of the list is slow and clunky, and doesn't have velocity scrolling like the actual iPhone contact list. Adding "-webkit-overflow-scrolling: touch" to .ioslist-wrapper makes the scrolling much smoother, but then the headers don't stick properly.

ioslist-animated left applied to groups

If some groups only have one item or none and the user scrolls up and down the list fast and then returns to the top of the list, it can sometimes cause some the groups to still have the class of ioslist-animated applied to them meaning that the headers overlap each other.

Adding this to the bottom of testPosition seems to fix it:

if( currentTop == 0 )
    $(this.options.selectors.groupContainer).removeClass(this.options.classes.animated);

Editing header height

Is there a way edit the header height and have the 'shunting' into position update to work with the new height? Thanks.

Update function

Is there a way of making an update function? If I want to add items dynamically, the plugin is not working.

Wrong bower main

Please correct the main property in bower.json, it should point to non-minified assets you deliver:

"main": [
  "dist/css/jquery.ioslist.css"
  "dist/js/jquery.ioslist.js"
]

Desktop Version?

This jQuery plugin looks fantastic, although seems to be only for mobile devices.

Have you considered a desktop version of this (similar to iOS-List)?

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.