Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Fixes issue #292 and the uniqueID method #1001

Merged
merged 1 commit into from
Jun 30, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions jquery.flexslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,8 @@
}
},
uniqueID: function($clone) {
$clone.find( '[id]' ).each(function() {
// Append _clone to current level and children elements with id attributes
$clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() {
var $this = $(this);
$this.attr( 'id', $this.attr( 'id' ) + '_clone' );
});
Expand Down Expand Up @@ -882,9 +883,8 @@
slider.cloneOffset = 1;
// clear out old clones
if (type !== "init") slider.container.find('.clone').remove();
// slider.container.append(slider.slides.first().clone().addClass('clone').attr('aria-hidden', 'true')).prepend(slider.slides.last().clone().addClass('clone').attr('aria-hidden', 'true'));
methods.uniqueID( slider.slides.first().clone().addClass('clone').attr('aria-hidden', 'true') ).appendTo( slider.container );
methods.uniqueID( slider.slides.last().clone().addClass('clone').attr('aria-hidden', 'true') ).prependTo( slider.container );
slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
.prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
}
slider.newSlides = $(slider.vars.selector, slider);

Expand Down