Add images at a later time #152

Closed
wants to merge 8 commits into
from

Projects

None yet

2 participants

@stefanhayden

Adding a function that lets images be added at an arbitrary time after slideshow is initiated. I added this so I could load images after pageload.

@srobbin
Owner
srobbin commented Nov 26, 2012

Hi Stefan,

Thanks for the pull request. I hadn't documented this before, but you can always access the images array through your instance. I've updated the documentation to make this more apparent.

$('.foo').backstretch([
  'path/to/image.jpg',
  'path/to/image2.jpg',
  'path/to/image3.jpg'
]);

// Access the instance
var instance = $('.foo').data('backstretch');

// Then, you can manipulate the images array directly
instance.images.push('path/to/image4.jpg')
@srobbin srobbin closed this Nov 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment