+ 2
Why does the slideDown method log an element file to the console rather than an element node object?
And how can I change this? I’m trying to create a sliding animation for the drop down menus. https://code.sololearn.com/W6LOkr12Y60T/?ref=app
1 Antwort
0
Because of this par, it's just letting you know what's happening:
console.log("element "+elem.getAttribute("class")+" slides down to "+dist+". offsetTop = "+elem.offsetTop);
You can store that same information to an element if you want.
Also, there's many flavors of sliding a menu, what exact effect are you looking for? If you're more specific, I'll happily type something up for ya.