probadly a easy thing
probadly a easy thing
so i made a litte slide thingy
website adress
www.cederbergsproduction.se/one/nyare.php
basicly i have 2 main links galleri and contact
when i toggle galleri i want contact to close if open
and if i click on mypictures i want that to open and if press is open to close
what i want really is to know if is there a shorter way to write the code and how.
this is what i got in the header
-
<script type="text/javascript">
$(document).ready(function() {
$("a.img").fancybox();
$('#mypictures').hide();
$('#press').hide();
$('#contact').hide();
$('#galleri').hide();
$('a#contact-toggle').click(function() {
$('#contact').slideToggle(400);
$('#galleri').hide();
$('#press').hide();
$('#mypictures').hide();
return false;
});
$('a#galleri-toggle').click(function() {
$('#galleri').slideToggle(400);
$('#contact').hide();
$('#mypictures').hide();
$('#press').hide();
return false;
});
$('a#mypictures-toggle').click(function() {
$('#mypictures').slideToggle(400);
$('#contact').hide();
$('#press').hide();
return false;
});
$('a#press-toggle').click(function() {
$('#press').slideToggle(400);
$('#contact').hide();
$('#mypictures').hide();
return false;
});
});
</script>
website adress
www.cederbergsproduction.se/one/nyare.php
kind regards
ps. im fully aware of my mixing of english and swedish on the site , but hey im not done yet
