Responsive Tabs is a jQuery plugin that provides responsive tab functionality. The tabs transform to an accordion when it reaches a CSS breakpoint. You can use this plugin as a solution for displaying tabs elegantly on desktop, tablet and mobile.
I investigated plugin code and cannot understand why for searching ul element used jquery children method in _loadElements method? For example in _setState method used another statement for searching ul element:
ResponsiveTabs.prototype._setState = function(e) {
var $ul = $('ul:first', this.$element);
When I am using this statement in _loadElements method my wrapper works great, for example:
ResponsiveTabs.prototype._loadElements = function() {
var _this = this;
// var $ul = this.$element.children('ul:first');
var $ul = $('ul:first', this.$element);
Why we need to find exactly ul element in children list and cannot use statement for searching ul from _setState method - $('ul:first', this.$element)? This statement for searching will find ul element within wrapper also.
Hi, I need to wrap ul element in div, when I am doing this responsive tabs not working. Code for example:
I investigated plugin code and cannot understand why for searching ul element used jquery children method in _loadElements method? For example in _setState method used another statement for searching ul element:
When I am using this statement in _loadElements method my wrapper works great, for example:
Why we need to find exactly ul element in children list and cannot use statement for searching ul from _setState method - $('ul:first', this.$element)? This statement for searching will find ul element within wrapper also.
What do you think about that? Thanks.