mirror of
https://github.com/e107inc/e107.git
synced 2025-07-27 18:00:30 +02:00
Added options to e_form->carousel() to disable navigation and indicators. Custom navigation can now display a custom label when 'label' is included in the carousel array.
This commit is contained in:
@@ -852,10 +852,22 @@ $(document).ready(function()
|
||||
|
||||
|
||||
$('body').on('slid.bs.carousel', '.carousel', function(){
|
||||
var currentIndex = $(this).find('.active').index();
|
||||
var text = (currentIndex + 1);
|
||||
var id = $(this).attr('id') + '-index'; // admin-ui-carousel-index etc.
|
||||
$('#'+id).text(text);
|
||||
|
||||
var label = $(this).find('.active').attr('data-label');
|
||||
var id = $(this).attr('id') + '-index'; // admin-ui-carousel-index etc.
|
||||
|
||||
if(label !== undefined)
|
||||
{
|
||||
$('#'+id).text(label);
|
||||
}
|
||||
else
|
||||
{
|
||||
var currentIndex = $(this).find('.active').index();
|
||||
var text = (currentIndex + 1);
|
||||
|
||||
$('#'+id).text(text);
|
||||
}
|
||||
|
||||
|
||||
// this takes commented content for each carousel slide and enables it, one slide at a time as we scroll.
|
||||
|
||||
|
Reference in New Issue
Block a user