Warning: Undefined property: stdClass::$enableajax in /home3/arturoc1/public_html/sapmendoza.org/moodle/config.php on line 20
/*!
* jQuery Tickerme Plugin v1.0
*/
(function($){
$.fn.tickerme = function(options) {
var opts = $.extend( {}, $.fn.tickerme.defaults, options );
return this.each(function(){
var ticker = $(this);
// SVG definitions for the play/pause/previous/next controls.
var control_definitions = '';
var control_styles = '';
// Array to contain news contents.
var contents = [];
var position = -1;
var timer;
init();
/* Initialise */
function init() {
// Hide all.
$(ticker).hide();
// Create the buttons.
$('body').prepend(control_definitions).prepend(control_styles);
var controls = '
';
controls += '
';
controls += '
';
controls += '';
controls += '';
controls += '
';
controls += '
';
$(controls).insertAfter(ticker);
// Load up the array.
$(ticker).children().each(function(i){
contents[i] = ($(this).html());
});
load_container();
}
/* load_container */
function load_container() {
if (position == (contents.length - 1)) {
position = 0;
} else {
position++;
}
// Fade out the current item, replace it with the next one, and fade it in.
if (opts.type == 'fade') {
$('#news').fadeOut(opts.fade_speed,function(){
$('#newscontent').html('