You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
![]()
15 years ago
|
// Set the initial height
|
||
|
var sliderHeight = "80px";
|
||
|
|
||
|
// Set the initial slider state
|
||
|
var slider_state = "close";
|
||
|
|
||
|
function sliderAction()
|
||
|
{
|
||
![]()
8 years ago
|
if (slider_state == "close") {
|
||
![]()
15 years ago
|
sliderOpen();
|
||
|
slider_state = "open"
|
||
![]()
14 years ago
|
$(".slider_menu").html('<a href="#" onclick="return sliderAction();"><img src="../img/icons/22/zoom_out.png"></a>');
|
||
![]()
8 years ago
|
} else if (slider_state == "open") {
|
||
![]()
15 years ago
|
sliderClose();
|
||
|
slider_state = "close";
|
||
![]()
14 years ago
|
$(".slider_menu").html('<a href="#" onclick="return sliderAction();"><img src="../img/icons/22/zoom_in.png"></a>');
|
||
![]()
15 years ago
|
}
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
function sliderOpen()
|
||
|
{
|
||
|
var open_height = $(".slider").attr("box_h") + "px";
|
||
|
$(".slider").animate({"height": open_height}, {duration: "slow" });
|
||
|
}
|
||
|
|
||
|
function sliderClose()
|
||
|
{
|
||
|
$(".slider").animate({"height": "0px"}, {duration: "fast" });
|
||
![]()
8 years ago
|
$(".slider").animate({"height": sliderHeight}, {duration: "fast" });
|
||
![]()
8 years ago
|
}
|
||
|
|
||
![]()
7 years ago
|
$(function() {
|
||
![]()
8 years ago
|
// Show the slider content
|
||
|
$('.slider').show();
|
||
|
$('.slider').each(function () {
|
||
|
var current = $(this);
|
||
|
current.attr("box_h", current.height());
|
||
|
});
|
||
|
|
||
|
$(".slider").css("height", sliderHeight);
|
||
![]()
7 years ago
|
});
|