thomaslo
11-18-2011, 01:23 PM
Hi,
I have very little knowledge in coding,
recently I found 2 scripts, (this is only part of the code for each one)
one creates a Dropmenu with Jquery (slidedown)
<script type="text/javascript" src="http://static.tumblr.com/3ikgvxs/0TGl4zgpu/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".links_body").hide();
$(".links_head").click(function(){
$(this).next(".links_body").slideToggle('fast');
}); }); </script>
Other one lets me change the header image as I click it (opens menu) and return to the original image when I click it the 2nd time (close menu). But this one doesn't slide out, it just appears.
function showhide(layer_ref,imgobj,src1,src2) {
var hza = document.getElementById(layer_ref);
var state=hza.style.display!='block';
hza.style.display = state?'block':'none';
imgobj.src=state?src2:src1;
I want to know if it is possible to combine the two, so i can have a slide open drop down menu with the head image that changes when i click it, and returns to original when i click it the 2nd time?
Any help would be greatly appreciated, Thank You!
I have very little knowledge in coding,
recently I found 2 scripts, (this is only part of the code for each one)
one creates a Dropmenu with Jquery (slidedown)
<script type="text/javascript" src="http://static.tumblr.com/3ikgvxs/0TGl4zgpu/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".links_body").hide();
$(".links_head").click(function(){
$(this).next(".links_body").slideToggle('fast');
}); }); </script>
Other one lets me change the header image as I click it (opens menu) and return to the original image when I click it the 2nd time (close menu). But this one doesn't slide out, it just appears.
function showhide(layer_ref,imgobj,src1,src2) {
var hza = document.getElementById(layer_ref);
var state=hza.style.display!='block';
hza.style.display = state?'block':'none';
imgobj.src=state?src2:src1;
I want to know if it is possible to combine the two, so i can have a slide open drop down menu with the head image that changes when i click it, and returns to original when i click it the 2nd time?
Any help would be greatly appreciated, Thank You!