PDA

View Full Version : Drop down/ Overlapping Content script - Suggestions



harrykitten
03-24-2008, 01:39 PM
1) Script Title:
Drop down/ Overlapping Content script

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex5/overlapcontent.htm

3) Describe problem:

My problem is that I have multiple entries on the page that could use the same drop down, but the way the script stands right now I have to repeat the content with different IDs. That seems wasteful and makes the page much larger than need be. Is there a way for multiple "rel"s to use the same tip IDs?

One potential workaround I thought of was to use the script to load the content dynamically. So while I'd still need to have a content DIV for each of my rels at least I wouldn't have to load everything. But, the way the script works it loads all the content on load. What i'd like for it to do is only load it onmouseover. I don't think it'd be too hard to do, but i'm struggling so far. Any suggestions?

ddadmin
03-24-2008, 08:35 PM
You can use the same drop down DIV for more than 1 anchor link on the page. The only thing that needs to be unique are the IDs of the anchor link themselves. For example, the below is two anchor links that both use the same drop down DIV as its content:


<p>Demo #1: <a href="http://www.dynamicdrive.com" id="searchlink" rel="subcontent">Search DD</a></p>

<p>Demo #1: <a href="http://www.dynamicdrive.com" id="searchlink2" rel="subcontent">Search DD</a></p>

<div id="subcontent" style=....>
"
"
</div>

dropdowncontent.init("searchlink", "right-bottom", 500, "mouseover")
dropdowncontent.init("searchlink2", "right-bottom", 500, "mouseover")