Title: Auto open on class
Last modified: March 9, 2017

---

# Auto open on class

 *  Resolved [streamworksaudio](https://wordpress.org/support/users/streamworksaudio/)
 * (@streamworksaudio)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/auto-open-on-class/)
 * Hi guys,
 * I was just wondering, is there any way to auto open a popup based on a class 
   that may or may not be present on the page.
 * Cheers,
    Chris

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

 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/auto-open-on-class/#post-8897306)
 * [@streamworksaudio](https://wordpress.org/support/users/streamworksaudio/) – 
   This could be done with either some custom JavaScript or I could write a custom
   condition for our Advanced Targeting if your already using it or interested in
   grabbing it.
 * Either way we will add it just as a utility for our users. If you do it via JS
   it would require setting up your own trigger using our JS api, its simple except
   for the fact that cookie checking would still be needed as well.
 * Hope that helps.
 *  Thread Starter [streamworksaudio](https://wordpress.org/support/users/streamworksaudio/)
 * (@streamworksaudio)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/auto-open-on-class/#post-8900749)
 * Thanks for the reply Daniel.
 * What I was thinking was having a popup fire when there is a WooCommerce message
   class in the page. The pop-up would hold the WooCommerce message. This might 
   be trickier than I thought. Not a huge problem… just wondering if it was at all
   possible.
 * Cheers,
    Chris
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/auto-open-on-class/#post-8901398)
 * [@streamworksaudio](https://wordpress.org/support/users/streamworksaudio/) – 
   Most definitely. There is very little you can’t do in terms of targeting, triggering
   etc with this plugin. Those specific mechanisms can be extended with new options
   pretty quickly in a very modular way that keeps it easy to maintian and add to.
 *  [ravirajotiya](https://wordpress.org/support/users/ravirajotiya/)
 * (@ravirajotiya)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/auto-open-on-class/#post-8908171)
 * I am using div tag like
    <div class=”Popbutton” align=”left”><button class=”popmake-
   736″>Click here to register</button></div>
 * You can generalise the solution for your website in the same way through class
   and class id.
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/auto-open-on-class/#post-8909007)
 * [@ravirajotiya](https://wordpress.org/support/users/ravirajotiya/) – In this 
   case he wants to prevent a popup from triggering if the `<body>` doesn’t have
   a WooCommerce class added to it.
 * For example if the user adds something to the cart WC might add a class of `wc-
   items-in-cart` to the body. He wants to prevent or trigger a popup based on if
   that class is there or not.
 * Thanks for trying to help though, much appreciated.

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

The topic ‘Auto open on class’ is closed to new replies.

 * ![](https://ps.w.org/popup-maker/assets/icon-256x256.gif?rev=3097653)
 * [Popup Maker - Boost Sales, Conversions, Optins, Subscribers with the Ultimate WP Popup Builder](https://wordpress.org/plugins/popup-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-maker/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/auto-open-on-class/#post-8909007)
 * Status: resolved