Reputation: 2060
I'm using Codecanyon's plugin Content Timeline.
$('.read_more').on('click', function() {
if ($(this).text() == 'Fechar') {
$(this).text('Saber Mais');
$.timeline('close', "06/08/2012"); // The id "06/08/2012" is only an example.
} else {
$(this).text('Fechar');
}
});
$('.t_close').remove();
I want to call this $.timeline('close', id);
to close the opened element, but it is not working. I get the label changed, but the closing action is not done. Does someone know how I can solve it?
Upvotes: 1
Views: 44
Reputation: 2060
$('.timelineLight').timeline('close', $(this).attr('data-id'));
This works.
$('.timelineLight').timeline({
openTriggerClass : '.read_more',
startItem : '15/08/2012',
categories: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro']
});
$('.read_more').on('click', function() {
if ($(this).text() == 'Fechar') {
$(this).text('Saber Mais');
$('.timelineLight').timeline('close', $(this).attr('data-id'));
} else {
$(this).text('Fechar');
}
});
$('.t_close').remove();
Upvotes: 1