Giter VIP home page Giter VIP logo

sorttable's Introduction

sorttable

sorttable.js file in this project repository can be used by anyone to sort their html tables dynamically.

A complete working example of a html table file is also added now for learning and testing puposes here.

Screenshot of this example is given below.

** Instructions: **

  1. Download this repository by clicking on the Code Button above and choose "Download ZIP" option.
  2. Extract the ZIP file and then copy the sorttable.js file to your HTML Table file folder.
  3. Add the line: <script src="sorttable.js"></script> to your HTML Table file, in its head section.
  4. Add class="sortable" to any table tag definition, that you have, to make it sortable.
  5. Click on any table headings to see it sort dynamically.

For Point 3. above, Alternately, you can use the following script/src tag value given below, in the head section of your html file, for an online reference to this javascript file:

<script src="https://cdn.jsdelivr.net/gh/linuxguist/sorttable@main/sorttable.js"></script>

If you need further help, then view and edit the .html file present in this download ZIP file, both on the Internet Browser and on good Code/Text Editors like Sublime Text OR Kate OR Geany OR Notepad++ OR Programmer's Notepad, for the syntax used therein. Search for keywords used there quickly.

This javascript code written originally by Stuart Langridge has been enhanced by me, in two ways:

  1. Replaced the Down/Up arrow icons with nice looking unicode counterparts.
  2. The sort ascending and descending order icons are shown appropriately.

Thanks to Stuart Langridge and many others for contributing the original code.

I thank the following forum article for inspiring me to develop this project idea: https://www.sololearn.com/Discuss/2497295/how-to-host-my-js-files-online-for-private-use-yourjavascript-com-is-not-working

HTML Table With Features

sorttable's People

Contributors

linuxguist avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

fl4min

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.