Git Product home page Git Product logo

jquery-table's Introduction

jquery-table

基于jquery的表格插件

demo:

<title>table</title> <script type="text/javascript" src="public/js/jquery.js"></script> <script type="text/javascript" src="public/js/jquery.table.js"></script> <style type="text/css"> @charset "utf-8"; *{margin:0;padding:0;} .kalengoTable{width:100%;padding:0;margin:0;border-collapse:collapse;border-spacing:0;} .kalengoTable .sortAble{cursor:pointer;} .kalengoTable .even{background:#999;} .kalengoTable .odd{background:#ccc;} .kalengoTable .hidden{display:none;} .kalengoTable img{border:none;vertical-align:middle;} .kalengoTable .kalengoThead{background:#333;color:#fff;} .kalengoTable .kalengoThead th{height:40px;line-height:40px;border:1px solid #333;text-align:center;position:relative;} .kalengoTable .kalengoThead .desc .downArrow{display:block;position:absolute;width:10px;top:0;right:10px;} .kalengoTable .kalengoThead .asc .upArrow{display:block;position:absolute;width:10px;top:0;right:10px;} .kalengoTable .kalengoTbody .kalengoTableTr:hover{background:#6CADD9;} .kalengoTable .kalengoTbody .kalengoTableTr .kalengoTableTd{vertical-align:middle;text-align:center;border:1px solid #333;padding:5px 10px;} .kalengoTable .kalengoTbody .kalengoTableTr .kalengoTableTd .contentContainer{width:100%;height:100%;} .kalengoTable .kalengoTableFoot{width:100%;height:35px;line-height:35px;background:#eee;text-align:center;color:#999;font-size:12px;} .kalengoTable .kalengoTableFoot th{text-align:center;} </style>
<script type="text/javascript"> var testData = [ {'name':'海军','age':0,'sex':'男','score':213,'img':'http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif',url:'http://www.baidu.com'}, {'name':'鹏爷','age':20,'sex':'女','score':120,'img':'http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif',url:'http://www.baidu.com'}, {'name':'av','age':30,'sex':'男','score':731,'img':'http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif',url:'http://www.baidu.com'}, {'name':'tree','age':10,'sex':'女','score':254,'img':'http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif',url:'http://www.baidu.com'}, {'name':'打算打','age':23,'sex':'男','score':312,'img':'http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif',url:'http://www.baidu.com'}, {'name':'试试','age':45,'sex':'男','score':123,'img':'http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif',url:'http://www.baidu.com'}, {'name':'大大','age':44,'sex':'女','score':222,'img':'http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif',url:'http://www.baidu.com'}, {'name':'随时','age':33,'sex':'男','score':111,'img':'http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif',url:'http://www.baidu.com'} ]; function mapFunction(testData){ var tempArr = []; var i = 0 , len = testData.length; for(;i

'; newObj['name'] = curObj['name']; newObj['age'] = curObj['age']; newObj['sex'] = curObj['sex']; newObj['score'] = curObj['score']; newObj['img'] = curObj['img']; newObj['url'] = curObj['url']; tempArr.push(newObj); } return tempArr; } var tempTable = new NAVY.Table($('#tableWrapper'),testData,mapFunction(testData),{ths:['头像','姓名','年龄','性别','得分'],sortable:[2,4],skip:{'img':'hidden','url':'hidden'}}); </script>

jquery-table's People

Contributors

navyxie avatar

Watchers

 avatar  avatar

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.