April 8, 201016 yr OK. I am VERY new. Working on my very first website right now. The website is mylilprincessparty.com and I am needing help on my 'Party Packages' page. I want to have 3 images either at top or on side (havent decided) labeled 'Package #1', 'Package #2', and 'Package #3'. I then want to be able to hover on the chosen 'Package' and have the package description appear in the center of the page. And then you hover on a different package for its description to appear and take the place of the first package description. Like a menu. I hope I explained this enough Thanks in advance for any help at all and let me know if I need to provide any further information to be more clear!!
April 8, 201016 yr That could be a hover-popup (no javascript) or a tooltip (which often uses javascript, so won't show for people with javascript disabled; google javascript tooltips or jQuery tooltips) For a hover popup example see item 1 here:- http://www.wickham43.net/hoverpopups.php The text below item 2 describes how to get all the popups in the same place (as shown in item 2).
April 8, 201016 yr Author OK, this looks like what I need. I am gonna study up on it now and try to put it into effect THANK YOU!!!! I'll definitely +1 you
April 8, 201016 yr Righty ho....this is a Javascript job. Put this in the html head on the page: <script type="text/javascript"> var oldID = 'p1_text'; // sets default visible package text function makeVis(newID) { if(oldID != newID){ document.getElementById(oldID).style.visibility = "hidden"; document.getElementById(oldID).style.height = "0px"; document.getElementById(newID).style.visibility = "visible"; document.getElementById(newID).style.height = "auto"; oldID = newID; } } </script> Add this to your CSS: .hide { visibility:hidden; height:0px; } And heres some guide html to get it working: <p> <a href="#" onclick="makeVis('p1_text')">Link 1</a> <a href="#" onclick="makeVis('p2_text')">Link 2</a> <a href="#" onclick="makeVis('p3_text')">Link 3</a> </p> <div id="p1_text">Text for Package #1</div> <div id="p2_text" class="hide">Text for Package #2</div> <div id="p3_text" class="hide">Text for Package #3</div> Doing it this way means that the text for all the packages will always be present on the page & can be seen by search engines. An alternative way to do this would be to replace the text....but the search engines wouldn't be able to see the text for the 2nd & 3rd links. If you change the div ID names, make sure that you set the first visible one in the javascript at the top to match.
April 8, 201016 yr Author Righty ho....this is a Javascript job. Put this in the html head on the page: <script type="text/javascript"> var oldID = 'p1_text'; // sets default visible package text function makeVis(newID) { if(oldID != newID){ document.getElementById(oldID).style.visibility = "hidden"; document.getElementById(oldID).style.height = "0px"; document.getElementById(newID).style.visibility = "visible"; document.getElementById(newID).style.height = "auto"; oldID = newID; } } </script> Add this to your CSS: .hide { visibility:hidden; height:0px; } And heres some guide html to get it working: <p> <a href="#" onclick="makeVis('p1_text')">Link 1</a> <a href="#" onclick="makeVis('p2_text')">Link 2</a> <a href="#" onclick="makeVis('p3_text')">Link 3</a> </p> <div id="p1_text">Text for Package #1</div> <div id="p2_text" class="hide">Text for Package #2</div> <div id="p3_text" class="hide">Text for Package #3</div> Doing it this way means that the text for all the packages will always be present on the page & can be seen by search engines. An alternative way to do this would be to replace the text....but the search engines wouldn't be able to see the text for the 2nd & 3rd links. If you change the div ID names, make sure that you set the first visible one in the javascript at the top to match. OK, I'm still playing around with this one. I changed 'onclick' to 'onmouseover' and got more of what I wanted. I dont want the labels to be linked though. Also, I plan on having the 'Pkg1', 'Pkg2', and 'Pkg3' labels be images that you mouseover and not just text. Will this change the code completely? Thanks for the help!
April 8, 201016 yr OK, I'm still playing around with this one. I changed 'onclick' to 'onmouseover' and got more of what I wanted. I dont want the labels to be linked though. Also, I plan on having the 'Pkg1', 'Pkg2', and 'Pkg3' labels be images that you mouseover and not just text. Will this change the code completely? Thanks for the help! They don't need to be links - it can be any html tag with a mouseover or onclick. Again the contents of the containers to be shown/hidden can be anything as long as the containers have an ID.
Create an account or sign in to comment