Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Anything Slider Again

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32266
    XaviJr
    Participant

    jamy_za advised me about this slider:
    https://css-tricks.com/forums/discussion/11454/solved-video-gallery-with-slider/#Item_4

    Well, i was able to make the slider work but now i have a problem.

    I have a 2 column website and i want the slider inside the left one. What is appearing is simply a centered slider, over all the content.

    Is this customizable or it only makes centered sliders?

    #51678
    jonibe
    Member

    How about wrapping the whole slider into another div?
    And position this wrapper as you please.
    Or i persume that you’re issue is the auto margin applied: in anythingslider.css

    /******* SET DEFAULT DIMENSIONS HERE ********/
    div.anythingSlider {
    width: 700px;
    height: 390px;
    margin: 0 auto;
    overflow: hidden; /* needed for Opera and Safari */
    }

    You could change margin into:

    margin: 0;

    But this is all just guessing …

    #51522
    XaviJr
    Participant

    Yes, i’ve reached that conclusion from a similar post, thanks anyway.

    Now i have another problem: when i call

    $('#slider1').data('AnythingSlider').goForward();

    or

    $('#slider1').data('AnythingSlider').goBack();

    the page is scrolled to the top. Any ideia why this is happening?

    #51523
    jamygolden
    Member

    It sounds like it isn’t returning false. Try this (I have no idea if this will work or not but it’s worth a shot)

    $('#slider1').data('AnythingSlider').goForward(function(){
    return false;
    });
    #51292
    XaviJr
    Participant

    Thank you both, somehow this stopped making that behavior, maybe other script was making some sort of conflict.

    I know have a little problem with pagination, it seems that it’s not working 100% well. I have 2 sliders, one with video and other with a photo gallery.

    The video slider works fine, just have a little problem when i go back (on the first time i click it slides forward) but it’s not important.

    The photo gallery is simply bad paginated. When i call

    var current = $('#slider1').data('AnythingSlider').currentPage;			

    first page is getting 2, second page is getting 1. Weird..

    #50440
    XaviJr
    Participant

    I’m using the current version, i’ve downloaded again all the files and still is getting the pagination wrong.

    But i was able to get things done using a javascript variable updated any time i call back or forward functions. :)

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.