2017 © Pedro PelĂĄez
 

project live-search

It's a plugin allows to dress and search data on HTML page at realtime built using the library jquery

image

indianghost/live-search

It's a plugin allows to dress and search data on HTML page at realtime built using the library jquery

  • Thursday, March 15, 2018
  • by IndianGhost
  • Repository
  • 2 Watchers
  • 4 Stars
  • 6 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 2 Versions
  • 20 % Grown

The README.md

Welcome to LiveSearch version2 Packagist

You can use this project to draw a table of data and to search values at realtime, just by following these few steps, (*1)

Install

Git

git clone https://github.com/IndianGhost/liveSearch.git

composer

composer create-project indianghost/live-search YourProjectName

Or (in case of stability issues), (*2)

composer create-project indianghost/live-search=dev-master YourProjectName

Intended users

Generally here are two users for this project (I guess so), if you are one of them don't hesitate to use it:, (*3)

1. In case you have one (or many in the same page) existing HTML table displays data (from a database or whatever):

You have an existing HTML table contains a lot of rows (for example: You display data from database into an HTML table), you want to add a functionality that allows you to find values of some row without scrolling page and wasting your time. This project can save you bro !, (*4)

Follow these steps

  1. clone it from github or download it via composer as mentioned above, (*5)

  2. include jquery on your webpage:, (*6)

    • via CDN copy & paste this line on your head block: <script src="http://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>

    OR, (*7)

  • local file You downloaded the project ! well, now copy the file js/jquery.min.js and paste it in your js directory. Then, add the tag script to your head block. <script type="text/javascript" src="LinkToYourDirectory/jquery.min.js"></script>
  1. add a new input tag, it will be your search box. it should have the id="js-search", for example I used this tag : <input type="text" class="form-control" style="width: 20%" id="js-search" placeholder="Taper pour chercher
"> :pushpin:Remember the required attribute is id="js-search", (*8)

  2. add an attribute class="js-table" to your table(s). When you type something in the search box the result will appear simultaneously on your table(s). :pushpin:Notice: if your table has not the tag <tbody> you must add it <table><tbody>Searched Data HERE</tbody></table>., (*9)

  3. Finally, You must copy the file js/search.js and add the script tag at the bottom of page (:pushpin:just before </body> for performance reasons). It should be similar to this tag : <script type="text/javascript" src="LinkToYourDirectory/search.js"></script>, (*10)

That's all for your case, enjoy !, (*11)

2. In case you have data already formatted using JSON:

In this case your task will be a piece of cake all you have to do is:, (*12)

  1. rename your json file to data.json, (*13)

  2. clone or download the project (step 1 above), (*14)

  3. replace the file js/data.json by your data.json !, (*15)

That's all for your case, enjoy !, (*16)

Demonstration

Demonstration edited by jqueryscripts.net I'm thankful to its team because they paid attention to this modest work, By the way this is the first version: https://www.jqueryscript.net/demo/Table-Live-Search-Plugin-jQuery/, (*17)

alt text, (*18)

alt text, (*19)

alt text, (*20)

alt text, (*21)

Copyright and license

Copyright 2018 Achraf BELLAALI Live Search is a free open-source project. The code is released under The MIT LICENSE you can do whatever you want with it !, (*22)

Support My development

If you found it helpful, you can support me to develop new projects By : Donate, (*23)

The Versions

15/03 2018

dev-master

9999999-dev

It's a plugin allows to dress and search data on HTML page at realtime built using the library jquery

  Sources   Download

MIT

by Achraf Bellaali

19/02 2018

2.0.1

2.0.1.0

It's a plugin allows to dress and search data on HTML page at realtime built using the library jquery

  Sources   Download

MIT

by Achraf Bellaali