Thickbox and multiple IDs
-
Hello
On the product list I want to show a full description which appears (pops up) after clicking the ‘Info’ button. In functions.php I use the following code:add_action( 'wp_enqueue_scripts', 'add_thickbox' ); function woocommerce_template_product_description() { ?> <div id="JamDescrPopup" style="display: none;"> <?php woocommerce_get_template( 'single-product/tabs/description.php' ); ?> </div> <div class="descrbutton"> <input alt="#TB_inline?height=400&width=600&inlineId=JamDescrPopup" class="thickbox" type="button" value="Info" /> </div> <?php } add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_product_description', 20 );
There are 3 products in the list. Popup works but for each product always shows description corresponding to the first product in the list – I assume because of one div id ‘inlineId=JamDescrPopup’.
When I remove style=”display: none;” in
<div id="JamDescrPopup" style="display: none;">
I see corresponding description for each product.
How to fix this issue and show proper description for each product in the popup window?
Thanks and regards!
Serg
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Thickbox and multiple IDs’ is closed to new replies.