Title: Onclick change table shortcode
Last modified: January 28, 2019

---

# Onclick change table shortcode

 *  Resolved [Dee Lete](https://wordpress.org/support/users/dee-lete/)
 * (@dee-lete)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/onclick-change-table-shortcode/)
 * I have a TablePress table for each state (50+ tables) i have a state index tab
   with all states on one page – when tab is clicked the table changes to the appropriate
   table. I have completed this with JS (display: none; for tables not showing),
   but the tables actually load on the page when doing a page load test (GTMetrix)
   which increases the page load time.
 * Would using ajax to “onlcick” change TablePress shortcode on the page so the 
   table is only called when chosen be a solution to this issue? If yes, can some
   please help with code or is there a plugin?
 * I did/do not want to create 50+ pages – Is there another option? Please help
 * DEE

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/onclick-change-table-shortcode/#post-11142890)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * Yes, AJAX would be a nice approach here, but unfortunately, there’s no readily
   available solution for this, sorry 🙁
 * Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Onclick change table shortcode’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [onclick](https://wordpress.org/support/topic-tag/onclick/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/onclick-change-table-shortcode/#post-11142890)
 * Status: resolved