Jquery 表格上色插件

http://franca.exofire.net/jq/colorize

Coloriza 是一个Jquery 插件,可以为表格的行添加背景颜色,鼠标动作后为行、列增加高亮效果。你可以为很多行、列填色,只要你愿意。再从点击已经填色的行、列就可以还原表格本色。

怎么使用?

使用默认设置(colorizes a row)
$(‘#yourTableId’).colorize() ;

其他设置和参数:

altColor : alternate row background color. The default is ‘#ECF6FC’, ‘none’ can be used for no alternate background color.交替行的背景颜色。默认值为’#ECF6FC’,’none’ 可替代的背景颜色使用。
bgColor : background color (The default background color is white).背景颜色(默认背景颜色为白色)。
hoverColor : background color when you hover a mouse over a row. The default is ‘#BCD4EC’.背景颜色当鼠标经过行。默认值为’#BCD4EC’。
hoverClass: style class for mouseover; takes precedence over hoverColor property为鼠标经过样式类;hoverColor优先
hiliteColor : row highlight color. The default color is ‘yellow’. ‘none’ can be used to disable highlighting.行高亮颜色。默认的颜色是’黄色’。 ‘none’可以用来取消高亮。
hiliteClass : style class to be used to highlight a row or a column, takes precedence over the hiliteColor setting.样式类可用于强调一行或一列,hiliteColor设置优先。
columns : true/false/’hover’/’rowHover’ – 默认 ‘false’. 如果 ‘true’,列高亮. 如果是 ‘hover’, a column is highlighted on mouseover鼠标经过时列高亮, but does not respond to clicking但是点击没有效果. 相反, a row is highlighted when clicked一行被点击时候高亮. 如果是 ‘rowHover’, a row is highlighted on mouseover鼠标经过时行高亮, and a column is highlighted on click点击后列高亮.
oneClick : true/false – Allows only one row or column to be highlighted at a time. A click on a new row/column cancels the current highlight. The default is false.true/false-只允许一行或一列加以高亮每次。点击新行/列取消当前的高亮效果。默认值为false。

banColumns :[]- Prevents certain columns from being highlighted when clicked, and also on mouseover. Supply an array of column indices as an argument. A value of ‘last’ can be used to ban the last column.可以实现被点击或鼠标经过时某些列不高亮 ,提供一个数组作为参数列指数。值为’last’可以用来禁止的最后一列。

banDataClick :true/false – If true, you can only click on table header rows. The default is false.如果‘true’,你只能点击表格标题行。默认值为false。
ignoreHeaders :true/false – If true, header rows are not colorized. (no striping). The default is true.如果‘true’,头行不彩色。 (不分段)。默认值为true。

nested :true/false . The default is false. Use it for more consistent striping if a table contains nested tables.默认值为false。使用更一致的条带,如果一个表包含嵌套表。

示例:

The order of parameters is not important.
$(‘#yourTableId’).colorize({bgColor:’#EAF6CC’, hoverColor:’green’, hiliteColor:’red’});
$(‘#yourTableId’).colorize({ oneClick:true});
$(‘#yourTableId’).colorize({columns:true, banColumns :[0,1]});
$(‘#yourTableId’).colorize({ hiliteClass:’myStyle’});

没有高亮:
$(‘#yourTableId’).colorize( { hiliteColor:’none’ } );





Jquery Colorize Plugin Demo



Jquery Colorize Plugin Demo

http://franca.exofire.net/jq/colorize

Coloriza 是一个Jquery 插件,可以为表格的行添加背景颜色,鼠标动作后为行、列增加高亮效果。你可以为很多行、列填色,只要你愿意。再从点击已经填色的行、列就可以还原表格本色。

怎么使用?

使用默认设置(colorizes a row)
$(‘#yourTableId’).colorize() ;

其他设置和参数:

altColor : alternate row background color. The default is ‘#ECF6FC’, ‘none’ can be used for no alternate background color.交替行的背景颜色。默认值为’#ECF6FC’,’none’ 可替代的背景颜色使用。

bgColor : background color (The default background color is white).背景颜色(默认背景颜色为白色)。

hoverColor : background color when you hover a mouse over a row. The default is ‘#BCD4EC’.背景颜色当鼠标经过行。默认值为’#BCD4EC’。
hoverClass: style class for mouseover; takes precedence over hoverColor property为鼠标经过样式类;hoverColor优先

hiliteColor : row highlight color. The default color is ‘yellow’. ‘none’ can be used to disable highlighting.行高亮颜色。默认的颜色是’黄色’。 ‘none’可以用来取消高亮。
hiliteClass : style class to be used to highlight a row or a column, takes precedence over the hiliteColor setting.样式类可用于强调一行或一列,hiliteColor设置优先。

columns : true/false/’hover’/’rowHover’ – 默认 ‘false’. 如果 ‘true’,列高亮. 如果是 ‘hover’, a column is highlighted on mouseover鼠标经过时列高亮, but does not respond to clicking但是点击没有效果. 相反, a row is highlighted when clicked一行被点击时候高亮. 如果是 ‘rowHover’, a row is highlighted on mouseover鼠标经过时行高亮, and a column is highlighted on click点击后列高亮.
oneClick : true/false – Allows only one row or column to be highlighted at a time. A click on a new row/column cancels the current highlight. The default is false.true/false-只允许一行或一列加以高亮每次。点击新行/列取消当前的高亮效果。默认值为false。

banColumns :[]- Prevents certain columns from being highlighted when clicked, and also on mouseover. Supply an array of column indices as an argument. A value of ‘last’ can be used to ban the last column.可以实现被点击或鼠标经过时某些列不高亮 ,提供一个数组作为参数列指数。值为’last’可以用来禁止的最后一列。

banDataClick :true/false – If true, you can only click on table header rows. The default is false.如果‘true’,你只能点击表格标题行。默认值为false。
ignoreHeaders :true/false – If true, header rows are not colorized. (no striping). The default is true.如果‘true’,头行不彩色。 (不分段)。默认值为true。

nested :true/false . The default is false. Use it for more consistent striping if a table contains nested tables.默认值为false。使用更一致的条带,如果一个表包含嵌套表。

示例

The order of parameters is not important.
$(‘#yourTableId’).colorize({bgColor:’#EAF6CC’, hoverColor:’green’, hiliteColor:’red’});
$(‘#yourTableId’).colorize({ oneClick:true});
$(‘#yourTableId’).colorize({columns:true, banColumns :[0,1]});
$(‘#yourTableId’).colorize({ hiliteClass:’myStyle’});

没有高亮:
$(‘#yourTableId’).colorize( { hiliteColor:’none’ } );

默认设置:
$('#tbl1').colorize();
点击后行高亮。

project_number cost_planned cost_actual computed sch_plan sch_actual effort_plan effort_actual scope_plan scope_act
 0101  10  20    70  20  0  0  0  0
 0102  12  34  55  555  55        
 0104                  
 0149                  
 0150  310000  310000  0  3000  2923  400  391  219  219
 0151                  
 0152  305250  0  -1  2493  2056  121  121  14  14
 0153  764800  719107  0  6078  5751  209  225  14  18
 0155  0  0    0  0  0  0  0  0
 0167  236000  54360  0  8647  10105  258  320  78  92

Jquery Colorize Plugin Demo – Colorizes Columns

Shows how to use the plugin to colorize columns:
$('#tbl1').colorize( {columns:true, oneClick:true} );.

Every new click defaults the current highlighted column back to the orginal background color.

project_number cost_planned cost_actual computed sch_plan sch_actual effort_plan effort_actual scope_plan scope_act
 0101  0  0    0  0  0  0  0  0
 0149                  
 0150  310000  310000  0  3000  2923  400  391  219  219
 0151                  
 0152  305250  0  -1  2493  2056  121  121  14  14
 0153  764800  719107  0  6078  5751  209  225  14  18
 0163                  
 0167  236000  54360  0  8647  10105  258  320  78  92
 0167  236000  54360  0  8647  10105  258  320  78  92
 0152  305250  0  -1  2493  2056  121  121  14  14
 0152  305250  0  -1  2493  2056  121  121  14  14
 0156  305250  0  -1  2493  2056  121  121  14  14


270 thoughts on “Jquery 表格上色插件

  1. Sling TV

    Great work! This is the type of info that should be shared
    across the web. Shame on the seek engines for no longer positioning this put up upper!

    Come on over and discuss with my web site . Thanks =)

  2. What Equipment is Needed for Sling TV

    Hello there, just became alert to your blog through Google, and
    found that it’s truly informative. I am going to watch out for brussels.
    I will be grateful if you continue this in future. A lot of people will be benefited from your writing.

    Cheers!

  3. Quest Bars

    Very good info. Lucky me I recently found your
    site by chance (stumbleupon). I have saved as a favorite for
    later!

  4. Quest Bars Cheap

    What i do not realize is in truth how you
    are no longer really much more well-liked than you might
    be right now. You’re very intelligent. You know thus considerably
    in relation to this matter, produced me in my view consider it
    from so many numerous angles. Its like women and men don’t seem to be fascinated until
    it’s something to accomplish with Girl gaga!
    Your personal stuffs excellent. At all times deal with
    it up!

  5. quest bars cheap

    Magnificent beat ! I would like to apprentice at the same time as you amend your website, how could i subscribe for a
    weblog site? The account helped me a acceptable deal.

    I have been a little bit familiar of this your broadcast provided vivid clear
    idea

  6. descargar facebook

    Hey There. I found your blog using msn. This is an extremely well written article.
    I’ll be sure to bookmark it and come back to read more of your useful information. Thanks for the post.
    I’ll certainly return.

  7. minecraft

    I think that is one of the most important information for me.
    And i am satisfied studying your article. But
    wanna statement on few normal things, The site taste is perfect, the articles is in point of fact great :
    D. Just right task, cheers

  8. minecraft

    Hi there fantastic blog! Does running a blog similar to this take a large amount of work?

    I have virtually no understanding of programming but I
    had been hoping to start my own blog soon. Anyhow, should
    you have any ideas or tips for new blog owners
    please share. I understand this is off topic nevertheless I simply needed to ask.
    Thanks a lot!

  9. minecraft

    An interesting discussion is worth comment. There’s no doubt that that
    you need to write more about this subject matter, it
    might not be a taboo subject but typically people don’t speak
    about these topics. To the next! All the best!!

  10. minecraft

    Hey There. I found your blog using msn. This is a really well written article.
    I’ll be sure to bookmark it and come back to read more of your useful info.
    Thanks for the post. I’ll certainly comeback.

  11. minecraft

    Definitely believe that which you stated. Your favourite justification appeared to be on the internet the easiest
    thing to keep in mind of. I say to you, I definitely get irked at the same time as other people consider concerns that they plainly
    do not know about. You managed to hit the nail
    upon the top as well as outlined out the whole thing with no need side effect , folks can take a signal.
    Will probably be again to get more. Thanks

  12. minecraft

    Hello my family member! I want to say that this post is awesome, nice written and
    come with almost all significant infos. I’d like
    to peer more posts like this .

  13. minecraft

    This is really interesting, You are a very skilled blogger.

    I’ve joined your feed and look forward to seeking more of your great post.
    Also, I’ve shared your site in my social networks!

  14. minecraft

    This paragraph is truly a pleasant one it helps new net viewers, who are wishing in favor of blogging.

  15. minecraft

    I do accept as true with all of the concepts you have introduced on your post.
    They are very convincing and can certainly work.
    Still, the posts are very short for newbies. May just you please lengthen them a little from next time?
    Thanks for the post.

  16. minecraft

    Hi! I could have sworn I’ve visited this web site before but after
    going through many of the posts I realized it’s new to me.

    Nonetheless, I’m definitely pleased I found it and I’ll be bookmarking it and checking back often!

  17. minecraft

    Hi! This is my first visit to your blog! We are a group
    of volunteers and starting a new initiative in a community in the same niche.
    Your blog provided us useful information to work on. You have done a outstanding job!

Comments are closed.