0

I am currently using a plugin call ascensor.js.

I am learning how to use it to create a website base on this ascensor plugin.

My main code goes like this with 5 division

<div id="content">
    <div class="page" id="welcome">
        <img src="images/1.jpg" class="bgimg">
    </div>
    <div class="page" id="team">
        <img src="images/2.jpg" class="bgimg">
    </div>
    <div class="page" id="price">
        <img src="images/3.jpg" class="bgimg">
    </div>
    <div class="page" id="testi">
        <img src="images/4.jpg" class="bgimg">
    </div>
    <div class="page" id="contact">
        <img src="images/5.jpg" class="bgimg">
    </div>
</div> 

This is the java to initiate ascensor..

$('#content').ascensor({
    direction: 'xy'
});

Currently I can make it go x, or y.

But from what I want is.. I want Welcome to be the main page which is in the center.. The black rectangle being the welcome page.. To the left would be team.. To the right would be testi.. To the top would be price.. To the bottom would be contact..

grid

Is there anyway I can do this using this plugin? I am very confused about the map and floor thingy..

John
  • 177
  • 1
  • 4
  • 19

1 Answers1

0

Define directions for your floor plan.

Floor plan is basically grid in which first number is row and second number is column. Coordinates must be written in order in which you want to show them (since you want to start from the center, write coordinates of center first).

var ascensor = $('#content').ascensor({
    childType: 'div',  
    direction: [[1, 1], [1, 0], [0, 1], [1, 2], [2, 1]], 
});
p3t3r
  • 3
  • 3