Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamically change given images #10

Open
mamaorha opened this issue Feb 12, 2014 · 5 comments
Open

dynamically change given images #10

mamaorha opened this issue Feb 12, 2014 · 5 comments

Comments

@mamaorha
Copy link

i tried something like this

function newSlide(imgs)
{
var titles = [];

$(document).ready(function()
{
    $('#kenburns-slideshow').Kenburns(
    {
        images: imgs,
            scale:1,
            duration:8000,
            fadeSpeed:1200,
            ease3d:'cubic-bezier(0.445, 0.050, 0.550, 0.950)',
        });
});

}

but it only works for the first time, if i resend new images nothing happens...

@sgaurav
Copy link

sgaurav commented Apr 15, 2014

you found any solution to this problem? Problem is that it is creating HTML markup on the first time and then using it from next time onward.

Interested to know if someone actually tweaked it to work with different set of images.

@mamaorha
Copy link
Author

i changed the files a bit, i did managed to get it to work

@sgaurav
Copy link

sgaurav commented Apr 15, 2014

Will it be possible for you to share snippet? Will save some work at my end.

@mamaorha
Copy link
Author

function newSlide(imgs)
{
var titles = [];

    $(document).ready(function()
    {
        $('#kenburns-slideshow').empty();
        $('#kenburns-slideshow').Kenburns(
        {
            images: imgs,
        scale:0.45,
        duration:12000,
        fadeSpeed:1200,
        ease3d:'cubic-bezier(0.445, 0.050, 0.550, 0.950)',

        onSlideComplete: function()
        {
            $('#slide-title').html(titles[this.getSlideIndex()]);
        },

        onLoadingComplete: function()
        {
            $('#status').html("Loading Complete");
            }
        });
    });

}

this is inside kenburst.js
its an alter of the function

$.fn[pluginName] = function ( options )
{
return this.each(function ()
{
var obj = $(this);
var items = $("div", obj);

        if (!$.data(this, 'plugin_' + pluginName))
        {
            $.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
        }

        else
        {
            $.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
        }
    });
}

@mamaorha mamaorha reopened this Apr 15, 2014
@sgaurav
Copy link

sgaurav commented Apr 16, 2014

working for me. thanks a ton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants