Forums

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

Home Forums JavaScript Resize anythingSlider with queries ?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38361
    Mellowfellon
    Member

    Ive got the awesome anythingSlider slider setup on multiple slides on the same page using:


    $('.screens').each(function() {
    $('.screens').anythingSlider({ ... })
    })

    I’m having trouble prepending the navigation from each slider. Using appendControlsTo just add’s each slides controls to the first instance of the slider.

    Besides that I want to know whether there is any way to get it to resize via css, or jquery with something like:

    function adjustWindow(width) {
    width = parseInt(width);
    if (width < 701) {
    //fire code
    } else if ((width >= 701) && (width < 900)) {
    // fire code
    } else {
    // fire code
    }
    }

    Please if you have a concept you can share I’d like to try that out.

    #103937
    Mottie
    Member

    If you are using css3 media queries, you can just change the size of the wrapper around AnythingSlider, but make sure you set the “expand” option to “true”. Here is a demo of it in action. Resize the browser window, it is set to fill the wrapper which is set to 100% and 50% width respectively.

    There is no need to make an “adjustWindow” function if you use css3 media queries.

    #103957
    Mellowfellon
    Member

    I think my problem is that since my slides have variable heights (all same widths though) resizing their width to fit the wrapper is easy, but what is left to do is update the heights.. that’s why I thought of using a adjustWindow() function. There are 6 with variable heights I don’t know how too target each one individually.

    Maybe that is not possible in this case.

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