@Mikel thanks, really helpful, this helped me a lot.
I'm not manages to:
- add class to parent "expanded"
-add function that move to top of the list the clicked element.
todo: make it better, smother and perhaps without a feeling that the clicked one jumps to the top.
@mikel what do you think?
https://codepen.io/davide77/pen/oKxpJw
@Jonathan
I managed to achieve what I need it. I'm still have to some one important part of this task.
Basically, on click, the clicked element should move to the top, so like this the user could always scroll down to click the others.
onComplete: function() {
if ($(element).length){
$("#menu").prepend($(element))
}
}
this code moves the element to the top.
Now I need a tell the others to re-order the height and the top position. Could anyone help me please?
https://codepen.io/davide77/pen/aevWYQ
@Jonathan
trust me I checked, but I did some copy and paste to mate demos.
https://codepen.io/davide77/pen/qeBJxO?editors=1010
even with the right class. Can't figure it out!!
I'm actually using a code from Blake! which is perfect. Unfortunately I keep getting error: Uncaught Cannot tween a null target.
I'm trying, I've also tried your code. :-(
https://codepen.io/davide77/pen/qeBJxO?editors=1010
@ZachSaucier
and thanks for that, but you not targeting the .accordion-group, also the toggle doesn't work, it should close the other
Have a look at this please
https://codepen.io/davide77/pen/RXwYrO?editors=0010
@ZachSaucier
Pease have a look at this, I'm quite close, only thing is now adding the extended class to all of them. It should add the class only to the clicked one
https://codepen.io/davide77/pen/rEojde?editors=1010
@ZachSaucier
Thanks, I'll look in to that, but What I needed since the beginning was to add a class to accordion-group.
I think that with a class to the parent I could achieve it with css.
@ZachSaucier
Yes, correct. Sorry I'm trying my best to explain.
the 4 group are divided by 4, height:100% / 4
On click, the selected one, takes out the height of the viewport. ( and potentially goes to the top.)
@ZachSaucier
no really, the content when expanded should be 100% height, which should push the other content offset.
Not sure how to achieve it. I was thinking that adding the class to the pared would do it.