Data target slideup/down

I thought I had enough code and help already to get this final step done, but seems not. What I think should be happening, isn’t and I can’t see why.

For those slightly familiar with my code (Pullo/MegaZoid), I’ve added a navigation bar at bottom of step containers, to allow forward and backward movement of steps. Perhaps I could have created a function within the current step change function to deal with the navigation, but for now I thought I’d start it as a separate function.

The problem is that the jq slideUp/Down functions are not being applied to the data targets. It is ok to have different data names pointing to the same elements/dom right?

for example… this is ok and target is used when calling slide

<div id ="s4-top" class="top" data-target="#s4-bottom" data-arrow="#step4-arrow">

In the same dom (s4), but at bottom, I have have

<div id="s4-back" class="back fromdir" data-backTo="#s3-bottom" data-thisBottom="#s4-bottom">

…with jq

$('.fromdir').on('click', function() {

var bottom = $(this).data("thisBottom");
var backTo = $(this).data("backTo");

//$($(this).data("thisBottom")).slideUp();
//$($(this).data('backTo')).slideDown();
$(bottom).slideUp();
$(backTo).slideDown();

I’m getting no console errors and no sliding…
Any obvious reason why?

Can you show live example of this?

temp ye…give me a mo

Hit 4 and code wise, this is only applied to the bottom of s4

http://175310703.linuxzone38.grserver.gr/test2/step4v10/s4-v2.html

will pm link

Big thanks to MegaZoid with this. Turns out the data ids with upperr case were causing probs. Changed all to lower and works as expected

from: data-backTo… data-thisBottom
to: data-backto … data-thisbottom

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.