0

I am trying to use a jquery plugin called ancensor.

The plugnin page is http://jque.re/plugins/image-galleries-decks/ascensor/#/Home

I have something like

    <nav class='navbar navbar-default' role='navigation '>
    <ul class='alinks list-inline links-to-floor'>
    <li class="list-group-item"><a href='#' class="ascensorLink ascensorLink1">test1</a></li>
       <li class="list-group-item"><a href='#' class="ascensorLink ascensorLink2" >test2</a></li>
       <li class="list-group-item"><a href='#' class="ascensorLink ascensorLink3">test3</a></li>
       <li class="list-group-item"><a href='#' class="ascensorLink ascensorLink4">test4</a></li>
       <li class="list-group-item"><a href='#' class="ascensorLink ascensorLink5">test5</a></li>
    </ul>
    </nav>

    <div id='ascensorBuilding'>
    <div class='ascensorFloor1'  style=''>
                test here
    </div>
    <div class='ascensorFloor2'  style='height:1200px; width:1000px; background-color:red;'>
               blog hree oooo
    </div>
    <div class='ascensorFloor3'  style='height:1200px; width:1000px; background-color:red;'>
    aaagg
    </div>
    <div class='ascensorFloor4'  style='height:1200px; width:1000px; background-color:red;'>
    dddd
    </div>
    <div class='ascensorFloor5'  style='height:1200px; width:1000px; background-color:red;'>
    ddd
    </div>




        <script src="/lib/jquery-1.8.0.min.js"></script>
        <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
        <script src="/lib/jquery.ascensor.js"></script>
        <script src="/lib/bootstrap/js/bootstrap.min.js"></script>

<script>
  $(function() {

  $('#ascensorBuilding').ascensor({
     AscensorName: 'ascensor',
         AscensorFloorName: '1.0 | 1.1 | 1.3 | 4.3 | 5.4 | 5.5 | 5.6 | 7.6 | 8.6 | 8.7 | 8.8 | 8.9 | 10.2',
         Time: 9000,
         WindowsOn: 1,
         Direction: "chocolate",
         AscensorMap: '1|1 & 2|1 & 3|1 & 3|2 & 3|3 & 4|3 & 5|3 & 3|4 & 3|5 & 4|5 & 5|5 & 6|5 & 3|6',
         Easing: 'easeInOutQuad',
         KeyNavigation: true,
         Queued: false,
         QueuedDirection: "y"
        })
  });

</script>

I have followed the plugins page direction but still can't get it to work. Can someone help me out about it? Thanks a lot!

10
  • any error in console? Commented Jan 15, 2014 at 18:38
  • no errors in console....:( Commented Jan 15, 2014 at 18:38
  • There's no documentation of the plugin at the linked site, and clicking on the download links says Forbidden. ??? Commented Jan 15, 2014 at 18:40
  • Are you sure you are using the correct option names? uppercase options aren't very common. Commented Jan 15, 2014 at 18:41
  • click on the small square bottom right Commented Jan 15, 2014 at 18:41

2 Answers 2

1

based on the documentation. You should try to do it with <section> first and when it is working change it with your needs.

HTML LINKS

<li><a class="ascensorLink ascensorLink1"></a></li>
<li><a class="ascensorLink ascensorLink2"></a></li>

HTML CONTENT

 <div id="ascensorBuilding">
        <section>
            //floor one content here
        </section>

        <section>
            //floor two content here
        </section>

        <section>
            //floor three content here
        </section>
    </div>

JAVASCRIPT

$('#ascensorBuilding').ascensor({
    AscensorName:'ascensor',
    ChildType:'section',
    AscensorFloorName:'Home | Implementation ',
    Time:1000,
    WindowsOn:1,
    Direction:'chocolate',
        AscensorMap:'2|1 & 2|2 & 3|2 & 2|3 & 2|4 & 1|4 & 2|5',
        Easing:'easeInOutQuad',
        KeyNavigation:true,
        Queued:false,

});
Sign up to request clarification or add additional context in comments.

1 Comment

I have done it but it seems not working either. :( +1
1

You're setting each floors class to ascensorFloorX. You need to set the id to those values instead. You can see a working example by looking at the source of the page you linked.

I.e. this

<div class='ascensorFloor1'  style=''>
     ^

should be this

<div id='ascensorFloor1'  style=''>
     ^

Also, your <div id='ascensorBuilding'> is missing the closing tag.

1 Comment

could you please explain more details? +1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.