Title: Determine the active tab
Last modified: April 23, 2021

---

# Determine the active tab

 *  Resolved [bluedogranch](https://wordpress.org/support/users/bluedogranch/)
 * (@bluedogranch)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/get-active-tab/)
 * Hi,
    How can I determine when the multi-step checkout is on a particular tab?
 * I need to apply CSS or jQuery to the page when the last tab “Confirm Order” is
   active.
 * This is the markup of the “Confirm Order” tab:
 *     ```
       <li class="thwmsc-tab tab-active">
       <a href="javascript:void(0)" id="step-3" data-step_name="order_review" data-step_title="Confirm Order" data-step="3" class="last active">
       <span class="thwmsc-tab-label"><span class="thwmsc-index thwmsc-tab-icon">4 </span>Confirm Order</span>
       </a>
       </li>
       ```
   
 * I need to do something like
 * if jQuery tab “Confirm Order” is active {
    // do this }
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [ThemeHigh](https://wordpress.org/support/users/themehigh/)
 * (@themehigh)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/get-active-tab/#post-14363714)
 * Please try adding the below code in your theme’s functions.php file.
 *     ```
       add_action('wp_footer', 'th123_check_step_number', 99);
       function th123_check_step_number() {
        if(is_checkout()){
          ?>
          <script type="text/javascript">
            (function($) {
                   $(document).on('step_jumped', function(event, step_no) {
   
                        if(step_no == 'yor_step_number'){
                        	// you can add css here by using js
                        }
                  });
   
            })(jQuery, window, document)
          </script>
          <?php
        }
       }
       ```
   
 * Please modify it based on your requirement. By adding this code you can identify
   the current tab number.
 * We hope this will help.
 * Thank you!
 *  Plugin Author [ThemeHigh](https://wordpress.org/support/users/themehigh/)
 * (@themehigh)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/get-active-tab/#post-14391806)
 * We hope your issue is resolved.
 * We are going to mark this thread as resolved.
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Determine the active tab’ is closed to new replies.

 * ![](https://ps.w.org/woo-multistep-checkout/assets/icon-256x256.png?rev=1832063)
 * [MultiStep Checkout for WooCommerce](https://wordpress.org/plugins/woo-multistep-checkout/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-multistep-checkout/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-multistep-checkout/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-multistep-checkout/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-multistep-checkout/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-multistep-checkout/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [ThemeHigh](https://wordpress.org/support/users/themehigh/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/get-active-tab/#post-14391806)
 * Status: resolved