do-web/jTinder

how to dynamically update the images

Closed this issue · 0 comments

I needed to dynamically update the images in the card stack, because I'm randomizing the order on every page reload. The readme only says you can update the images by changing the css, but I came up with a quick jquery command to dynamically change images. Thought I would share here for anyone else who might need:

$('.pane5 .img').css('background', 'url('+'URL_HERE'+')'+' no-repeat scroll center center').css('background-size', 'cover')

Just replace pane5 with your pane number and URL_HERE with the image url.