I need a modification to the script. I have tired for two hours and gave up. If anyone can help please let me post.
JQUERY/JAVASCRIPT
- $(function() { // Shorthand for $(document).ready(function() {
- $('dl.dropdown dt a').click(function() {
- $(this).closest('.dropdown').find('dd ul').toggle();
- });
- $('dl.dropdown dd a').click(function() {
- $(this).closest('ul').hide().
- closest('.dropdown').find('dt span').html($(this).html());
- });
- $(document).click(function(e) {
- if ($(e.target).closest('.dropdown').length == 0) {
- $('dl.dropdown dd ul').hide();
- }
- });
- });
HTML CODE- <dl class="dropdown">
- <dt><a href="javascript:void(0);"><span> Other Services</span></a></dt>
- <dd>
- <ul>
- <li><a href="[blank]"><img class="icondd" src="images/wordpress-icon.png" alt="" /> [blank]<br>
- <small class="navhide"><em>
[blank] </em></small></a></small></li>
- <li><a href="[blank]"><img class="icondd" src="images/moose-icon.png" alt="" /> moozetracks<br>
- <small class="navhide"><em> [blank] </em></small></a></li>
- <li><a href="[blank]"><img class="icondd" src="images/rocketape-icon.png" alt="" /> rocketape<br>
- <small class="navhide"><em>
[blank] </em></small></a></li>
- <li><a href="
[blank] "><span> Other Sites</span></a></li>
- <li><a href="
[blank] "><img class="icondd" src="images/beer-icon.png" alt="" /> find a beer<br>
- <small class="navhide"><em>
[blank] </em></small></a></li>
- <li class="bottom"><a href="
[blank] "><img class="icondd" src="images/tv-icon.png" alt="" /> [blank]<br>
- <small class="navhide"><em>
[blank] </em></small></a></li>
- </ul>
- </dd>
- </dl>
When you select an item I need to make the following despair:
- <br><small class="navhide"><em> [blank] </em></small>
It need to be there still once you click it again.
I know it probable easy do to, but I cannot figure it out.