Skip to content

Commit cb01ac8

Browse files
committed
use addBack or andSelf; fixes #508
1 parent 5b98b7d commit cb01ac8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/jquery.anythingslider.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
base.$el.find('.cloned').each(function(){
234234
// disable all focusable elements in cloned panels to prevent shifting the panels by tabbing
235235
$(this).find('a,input,textarea,select,button,area,form').attr({ disabled : 'disabled', name : '' });
236-
$(this).find('[id]').andSelf().removeAttr('id');
236+
$(this).find('[id]')[ $.fn.addBack ? 'addBack' : 'andSelf' ]().removeAttr('id');
237237
});
238238
}
239239

@@ -265,7 +265,7 @@
265265
base.$nav.find('a').eq(base.currentPage - 1).addClass('cur'); // update current selection
266266

267267
if (o.mode === 'fade') {
268-
var t = base.$items.eq(base.currentPage-1);
268+
t = base.$items.eq(base.currentPage-1);
269269
if (o.resumeOnVisible) {
270270
// prevent display: none;
271271
t.css({ opacity: 1 }).siblings().css({ opacity: 0 });
@@ -445,7 +445,7 @@
445445
base.setDimensions = function(){
446446

447447
// reset element width & height
448-
base.$wrapper.find('.anythingWindow, .anythingBase, .panel').andSelf().css({ width: '', height: '' });
448+
base.$wrapper.find('.anythingWindow, .anythingBase, .panel')[ $.fn.addBack ? 'addBack' : 'andSelf' ]().css({ width: '', height: '' });
449449
base.width = base.$el.width();
450450
base.height = base.$el.height();
451451
base.outerPad = [ base.$wrapper.innerWidth() - base.$wrapper.width(), base.$wrapper.innerHeight() - base.$wrapper.height() ];
@@ -940,4 +940,4 @@
940940
});
941941
};
942942

943-
})(jQuery, window, document);
943+
})(jQuery, window, document);

0 commit comments

Comments
 (0)