Hi all,
I am stuck here in a problem, that at first I thought would be easy to solve, but then it didn’t.
I have to add that I am a relative beginner.
In my page I created a fold out menu with the following items (titles of things shown on the page)
<div id = "foldout" class="item firstleft"> (//with CSS opacity: 0)
<img class="titles" src="images/title_1.png"></img>
<img class="titles" src="images/title_2.png"></img>
<img class="titles" src="images/title_3.png"></img>
<img class="titles" src="images/title_4.png"></img>
</div>
on document ready I have:
$('#foldout .titles').first().delay(500).animate({opacity: 1,top: '25px'}, 950, 'easeOutBack');
and then
inside a special function:
$('#foldout').children().first().animate({opacity: 0, top: '-25px'}, 950, 'easeOutBack',function(){
var title = $("#gwork").val();
$(this).attr('src', 'images/title_'+title+'.png')
})
.animate({opacity: 1, top: '25px'}, 950, 'easeOutBack');
animating the first of this titles, i.e. it moves down, getting visible and presenting the first (current) work title,
while the other three are suggested by a mouseover (hover) on a parent element.
Then by going on (presenting the next work) the visible title changes.
My problem now that on documentReady its easy to achieve that NOT the first title is part of the fold out suggestions with:
$("#menu div:first")
.hover(function(){
$('#foldout').children()
.not(':first')
.each(folder);
},function(){
$('#foldout').children()
.not(':first')
.stop(true.true)
.animate({'opacity': 0,'top': '0px','margin-top': '0px'}, 600, 'easeOutSine',function(){
$(this).stop(true.true)
.css('position', 'absolute');})
});
(its like an accordian moving out above the parent menu title)
but when the visible title changes attribute the new title presented would have to be excluded from the fold out so that everytime only the remaining titles would show on the hover.
I recognize that it was a little complicated to explain :-(
Hope though that someone understands what I mean and could lend me a hand.
I thought about using an array in a variable that could exlcude everytime another of its elements, or something like this, but I am not firm enough to write a proper code.
Thanks for help!!
Garavani