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

settings is undefined #29

Open
galastur opened this issue Jun 10, 2015 · 1 comment
Open

settings is undefined #29

galastur opened this issue Jun 10, 2015 · 1 comment

Comments

@galastur
Copy link

Hi,

I am trying to use the webticker, but got the following error when trying to stop it.

0x800a138f - JavaScript runtime error: Unable to get property 'moving' of undefined or null reference

stop: function () {
var settings = $(this).data('settings');
if (settings.moving) { ###################### settings is undefined
settings.moving = false;
return this.each(function () {
if (cssTransitionsSupported) {
var currentPosition = $(this).css(settings.direction);
$(this).css('transition-duration', '0s').css(settings.direction, currentPosition);
} else
$(this).stop();
});
}
},

This is how I initialize the ticker

$("#webticker").webTicker({
speed: 50, //pixels per second
direction: "left", //if to move left or right
moving: true, //weather to start the ticker in a moving or static position
startEmpty: true, //weather to start with an empty or pre-filled ticker
duplicate: false, //if there is less items then visible on the ticker you can duplicate the items to make it continuous
rssurl: false, //only set if you want to get data from rss
rssfrequency: 0, //the frequency of updates in minutes. 0 means do not refresh
updatetype: "reset" //how the update would occur options are "reset" or "swap"
});

And the button to stop it:

 $('.div-banner-ticker-clear').click(function () {
     //clear the ticker
     $('#webTicker').webTicker('stop');
 });

Any help will be appreciate it!

Thanks

@galastur
Copy link
Author

ouch! found it...

$('#webTicker').webTicker('stop'); =====> should be: $('#webticker').webTicker('stop');

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

1 participant