1 popup for each image
-
Hi,
This code inserts the Feautured Image into a popup:
if ( has_post_thumbnail()) { echo '<a id="thumbnail-thumbnail" href="#" class="popup_oeffnen" title="' . the_title_attribute('echo=0') . '" >'; echo get_the_post_thumbnail($post->ID, 'category-thumb', 'class=custom-thumbnail'); echo '</a>'; echo ' <div id="popup"> <div class="schliessen"></div> <div id="popup_inhalt"> ' . get_the_post_thumbnail($post->ID, 'large', 'class=large-thumbnail') . '</div> </div> <div id="hintergrund"></div> '; }
So get_the_post_thumbnail($post->ID, ‘large’, ‘class=large-thumbnail’) is what comes into the popup. What do I have to do, if I also want any other image which gets added into the TinyMCE editor appear into that popup? Separately of course, so not all images into 1 popup!
My JavaScript looks like that:
jQuery(function($) { var popup_zustand = false; $(".popup_oeffnen").click(function() { if(popup_zustand == false) { $("#popup").fadeIn("normal"); $("#hintergrund").css("opacity", "0.7"); $("#hintergrund").fadeIn("normal"); popup_zustand = true; } return false; }); $(".schliessen").click(function() { if(popup_zustand == true) { $("#popup").fadeOut("normal"); $("#hintergrund").fadeOut("normal"); popup_zustand = false; } }); });
I appreciate any help!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘1 popup for each image’ is closed to new replies.