Way Routing not working

54 views
Skip to first unread message

Eduard Kosel

unread,
Aug 14, 2013, 8:30:51 AM8/14/13
to jmpr...@googlegroups.com
Hello,

I want to use the way routing feature as suggested in the documentation.

Jmpress is working great when I call it with the standard-initialization:

$(function() {
      $("#demo").jmpress();
    });

However when I want to use the Route-Feature it breaks and it doesn't work. I already tried to replace the " with ' and such things. But it just does not work.

$(function() {
    $("#demo").jmpress("route", ["#home", "#one", "#home", "#two", "#home", "#three", "#home", "#four", "#home", "#five"],true,true);
    });

I have uploaded the project to my webspace. It would be really nice if someone could give me a hint where the error might be.


Cheers Eduard

Tobias Koppers

unread,
Aug 14, 2013, 8:42:34 AM8/14/13
to jmpress.js
You cannot use a step multiple times in a route. The route commando just set "next" and "prev" on the steps.

But you can delegate one step to another:

<section id="home"></section>
<section id="one"></section>
<section id="home2" data-delegate="#home"></section>
<section id="two"></section>
<section id="home3" data-delegate="#home"></section>
<section id="three"></section>

section[data-delegate] {
  display: none;
}


2013/8/14 Eduard Kosel <eduar...@googlemail.com>

--
You received this message because you are subscribed to the Google Groups "jmpress.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmpressjs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Eduard Kosel

unread,
Aug 14, 2013, 8:50:07 AM8/14/13
to jmpr...@googlegroups.com, tobias....@googlemail.com
Alright, thats good to know. Thanks.

However I now changed my Route according to the DOM, but it still does not initialize. And just displays all steps without correct positioning or functionality.

<script type="text/javascript">
    $(function() {
    $("#demo").jmpress("route", ["#home", "#one", "#two", "#three", "#four", "#five"],true,true);
      //$("#demo").jmpress();
    });
  </script>  

Please have a look at it:

Reply all
Reply to author
Forward
0 new messages