SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Oct 2008
    Location
    Gainesville,TX
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with Javascript Slider

    I've attempted to use this bxslider.com javascript slider. I've followed the directions to change the options but I can't seem to get random start and an auto start. What am I missing?

    http://www.northtexasnerd.com/mockups/cindys/
    North Texas Nerd - website design, graphic design and more.

    "We make being a nerd look good"

  2. #2
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Choosing a random start slide and have the slides go on their own both seem to be configurable options with bxSlider.

    I was a little confused about how one goes about configuring them, but I found it on the bxSlider examples page: Pass an object with your options to the "bxSlider" function in your code.
    I'm the web overlord for Graphic Business Systems

  3. #3
    SitePoint Member
    Join Date
    Oct 2008
    Location
    Gainesville,TX
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sdleihssirhc View Post
    Pass an object with your options to the "bxSlider" function in your code.
    I'm not sure I understand what you mean by this. Please elaborate.
    North Texas Nerd - website design, graphic design and more.

    "We make being a nerd look good"

  4. #4
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You have the following JS near the top of your page:

    Code JavaScript:
    $(document).ready(function(){
        $('#slider1').bxSlider();
    });

    All you have to do is pass an object to that "bxSlider" function, with your config options. For example:

    Code JavaScript:
    $(document).ready(function(){
        $('#slider1').bxSlider({
            auto: true,
            randomStart: true
        });
    });
    I'm the web overlord for Graphic Business Systems

  5. #5
    SitePoint Member
    Join Date
    Oct 2008
    Location
    Gainesville,TX
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow. Who knew it was that easy?! Thank you so much!
    North Texas Nerd - website design, graphic design and more.

    "We make being a nerd look good"

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,700
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by NTxNerd View Post
    Wow. Who knew it was that easy?! Thank you so much!
    For future reference, a look at any of their examples shows how the object of config options is passed to bxSlider function.
    http://bxslider.com/examples
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •