Try to find a global function, to get and to put the backgroundPosition-values, but I feel a bit confused.
Here is the function:
function global_backgroundPosition_Menu(num){
$('#Navigation_1')
.css({
backgroundPosition: num + "px 0"
})
}
///////////////////
An here I want to call and put the function:
if ($('#Navigation_1 li.leistungen.active').length != 0){
global_backgroundPosition_Menu();
$('#Navigation_1')
.css({
backgroundImage: "url(images/background/menu_highlight_hg.png)",
backgroundRepeat: "no-repeat",
})
.animate({
backgroundPosition: "30px 0"
})
global_backgroundPosition_Menu(30)
};
its a simple jQuery command i would not make a funktion just for this.
but you have to use it like this.
your function could look like that:
— meo yesterday
—> Thanks meo for your answer, unfortunately your answer disappeared. So i repeat it her.
I will use this procedere, after a new page is load. But there, the setter is :
and not something like
Has anyone an idea …