An open API service indexing awesome lists of open source software.

https://github.com/suifengtec/wp-responsive-tables

Responsive tables by given css selectors.
https://github.com/suifengtec/wp-responsive-tables

wordpress wordpress-plugin

Last synced: about 1 month ago
JSON representation

Responsive tables by given css selectors.

Awesome Lists containing this project

README

          

# WP-Responsive-Tables
Responsive tables by given css selectors.

## Usage

output tables as following:
```



产品参数





货号
形状
重量
颜色
切工
抛光
对称
荧光
证书




c128
祖母绿
0.82
G
GD
VG
VG
Faint
统包货






货号1
形状1
重量1
颜色1
切工2
抛光3
对称3
荧光3
证书3




c128
祖母绿
0.82
G
GD
VG
VG
Faint
统包货



```

## Add table selectors

Type your table selectors directly in the following method:
```

/*
define table selectors.
*/
public static function get_table_selectors(){

$r = array(
'#tab-description table#aaa',
'#tab-description table#sss',
);

return apply_filters('coolwp_responsive_table_selectors', $r );
}

```

Load your table selectors by using the filter hook `coolwp_responsive_table_selectors`.

## Tips

It works fine when `wp_is_mobile()` return `true` by default, you can use hook `coolwp_responsive_table_enabled` filter it.

## Screenshot

* Mobile devices:

![](https://raw.githubusercontent.com/suifengtec/WP-Responsive-Tables/master/screenshot-1.jpg)

* Tablet devices:

![](https://raw.githubusercontent.com/suifengtec/WP-Responsive-Tables/master/screenshot-2.jpg)

* Desktop:

![](https://raw.githubusercontent.com/suifengtec/WP-Responsive-Tables/master/screenshot-3.jpg)