ScampNZ Posted February 17, 2008 Posted February 17, 2008 When you mouse over a certain word or image a image pops up and then disappear when you move the mouse away? If this is possible how can I do it? What code would I need? If this isn't possible what would the next best thing be? I have only got a few days to get this sorted so I appreciate all the help I can get with this! Thanks in advance :) :thumbsup:
Guest Posted February 17, 2008 Posted February 17, 2008 When you mouse over a certain word or image a image pops up and then disappear when you move the mouse away? If this is possible how can I do it? What code would I need? If this isn't possible what would the next best thing be? I have only got a few days to get this sorted so I appreciate all the help I can get with this! Thanks in advance :) :thumbsup: Mostly, it is text within the alt tag eg alt="" becomes alt="your text"
chris23 Posted February 17, 2008 Posted February 17, 2008 Mostly, it is text within the alt tag eg alt="" becomes alt="your text" This depends on the browser. Firefox, correctly, doesn't display alt text when you mouseover an image. IE, incorrectly (surprise, surprise!) does. This is the job of the title tag. Titles can be applied to most elements, not just images. If you want to add title text to some images, you can pass title="Your text here" as a parameter to the tep_image function. Alternatively, if you want this for all images that have alt text, you can modify the tep_image function to do this globally: EDIT catalog/includes/functions/html_output.php FIND: $image .= '>'; BEFORE, ADD: if (tep_not_null($alt)) { $image .= ' title="' . tep_output_string($alt) . '"'; } HTH Chris Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored. Google Site Search is your friend My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes
ScampNZ Posted February 18, 2008 Author Posted February 18, 2008 So it can only be done with text and not an image?
Guest Posted February 18, 2008 Posted February 18, 2008 Thank you Jan. Because of your comment, I played with the general.php file a bit more and I got it to work after I moved the require for the tax class to before my require for STS and it worked. Thanks again. you can probably achieve this with javascript. i don't recall any contributions that do this, but i have seen it on sites before.
berkedam Posted February 18, 2008 Posted February 18, 2008 When you mouse over a certain word or image a image pops up and then disappear when you move the mouse away? If this is possible how can I do it? What code would I need? If this isn't possible what would the next best thing be? I have only got a few days to get this sorted so I appreciate all the help I can get with this! Thanks in advance :) :thumbsup: What you are probably looking for is in HTML mostly known as: tooltip Can be done in CSS or JavaScript. Link: CSS tooltip "If you're working on something new, then you are necessarily an amateur."
Recommended Posts
Archived
This topic is now archived and is closed to further replies.