Skip to content

Commit

Permalink
v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsroge committed Jun 23, 2015
1 parent 47cdd05 commit 722c232
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "owl.carousel2.thumbs",
"version": "0.1.2",
"version": "0.1.3",
"homepage": "https://github.com/gijsroge/OwlCarousel2-Thumbs",
"authors": [
{ "name" : "Gijs Rogé",
Expand Down
9 changes: 6 additions & 3 deletions dist/owl.carousel2.thumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
}

//check what thumbitem has been clicked and move slider to that item
$(this._thumbcontent._thumbcontainer).on('click', 'button', $.proxy(function (e) {
$(this._thumbcontent._thumbcontainer).on('click', this._thumbcontent._thumbcontainer.children(), $.proxy(function (e) {

// find relative slider
this._identifier = $(e.target).closest('.' + options.thumbContainerClass).data('slider-id');
Expand Down Expand Up @@ -153,7 +153,11 @@
var options = this.owl.options;

//create thumbcontainer
this._thumbcontent._thumbcontainer = $('<div>').addClass(options.thumbContainerClass).appendTo(this.$element);
if (!options.thumbsPrerendered) {
this._thumbcontent._thumbcontainer = $('<div>').addClass(options.thumbContainerClass).appendTo(this.$element);
} else {
this._thumbcontent._thumbcontainer = $('.' + options.thumbContainerClass + '').appendTo(this.$element);
}

//create thumb items
var i;
Expand Down Expand Up @@ -186,7 +190,6 @@

// set relative thumbnail container
var thumbContainer = options.thumbPrerendered ? $('.' + options.thumbContainerClass + '[data-slider-id="' + this._identifier + '"]') : this._thumbcontent._thumbcontainer;

thumbContainer.children().filter('.active').removeClass('active');
thumbContainer.children().eq(this.owl_currentitem).addClass('active');
};
Expand Down
2 changes: 1 addition & 1 deletion dist/owl.carousel2.thumbs.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "owl.carousel2.thumbs",
"title": "Owl Carousel 2 Thumbnails",
"description": "Enables thumbnail support for Owl Carousel 2.0",
"version": "0.1.2",
"version": "0.1.3",
"main": "dist/owl.carousel2.thumbs.min.js",
"homepage": "https://github.com/gijsroge/OwlCarousel2-Thumbs",
"author": {
Expand Down

0 comments on commit 722c232

Please sign in to comment.