PDA

View Full Version : Custom Drop Down Help


merk_aus
12-16-2010, 07:13 AM
Okay people I was wondering if one of you smart cookies out there would be able to help me?

On my networked sites I had a drop down menu at the very top that allowed members to click and select between my websites that they would go to.

I have since upgraded from 3.8.x to 4.1 and was hoping someone here may be able to have a look at our code and attempt to tell me what needs to be done to update it to vb4.1 speak.

<!-- here and below is the pulldown code -->
<div class="global_pulldown"><div id="pulldown_content">
<!-- start custom pulldown content -->

<table width="100%" border="0">
<tr>
<td align="left"><img src="http://sportainment.com.au/forums/images/misc/sportainmenttest.gif" alt="Sportainment Media Group" width="296" height="146"></td>
<td align="center" valign="top"><p><a href="http://forums.sportainment.com.au" target="_self"><font color="#000000">Sportainment Media Group</font></a><br>
<a href="http://www.webmasters-resort.com" target="_self"><font color="#000000">Webmasters Resort</a></font><br>
</p></td>
<td align="center" valign="top"><br>
<a href="http://forums.sports-force.co.nz" target="_self"><font color="#000000">Sports Force Interactive</a></font><br>
<a href="http://www.paranormalboard.com" target="_self"><font color="#000000">Paranormal Board</a></font></td>
</tr>
</table>

<!-- end custom pulldown content -->
</div><div id="pulldown_handle"><img src="http://sportainment.com.au/forums/images/misc/sportainmenttestsml.gif" alt="Sportainment Media Group" width="122" height="60">Click to view networked sites</div></div>

<style type="text/css">
.global_pulldown
{
display: none;
background-color: #f9f9f9;
text-align: center;
position: absolute;
color: white;
width: 100%;
}
#pulldown_handle
{
cursor: pointer;
color: #333333;
padding: 5px;
}
</style>

<script type="text/javascript" src="clientscript/jquery/jquery-1.4.2.min.js?v=$vboptions[simpleversion]"></script>

<script type="text/javascript">
jQuery.noConflict(true)(function($)
{ //move and display the dropdown
var cont = $('#pulldown_content').hide(), hndl = $('#pulldown_handle'), fst = $('body > :visible:first');
var bdy = $('body'), pull = $('div.global_pulldown').prependTo(bdy).show(), show = false;
var hit = hndl.outerHeight(), bht = bdy.css('background-position').split(' ');
bdy.css('background-position', bht[0] + ' ' + hit + 'px');
pull.css('margin-top', '-' + hit + 'px');
fst.css('margin-top', hit + 'px');

hndl.click(function()
{ //handle clicking control
if (show = !show) cont.slideDown(); else cont.slideUp();
$(this).toggleClass('expanded', show);
});
});
</script>
<!-- here and above is the pulldown code -->

There is the code.