elboletaire / tabbedcontent Goto Github PK
View Code? Open in Web Editor NEW:open_file_folder: jQuery / Zepto lightweight tabs plugin
Home Page: http://elboletaire.github.io/tabbedcontent
License: MIT License
:open_file_folder: jQuery / Zepto lightweight tabs plugin
Home Page: http://elboletaire.github.io/tabbedcontent
License: MIT License
Is it possible to disabled the hash if i open the page for the first time?
Problem is:
When i have multiple tabbed contents, always the first tablink hash of the last tab container is added to the url ...
Same problem occurs in the multiple tabbed contents demo
This problem can be fixed by not adding the hash to the url if theres no hash present.
Is there a way to disable HTML5 history API? What speaks against it?
This is a jQuery/Zepto plugin. Has no sense to prefix the filename with jquery
.
Would be amazing if tabbedcontent was easy to import via import
statement in ES6.
I only need to replace the current
class with active
and set it on the li
element instead of the a
.
It might be usefull if the element triggers an onIniti and onSwitch event, additionally to the callback methods
The links
option allows us to set a different set of links for our tabbedcontent, but it does not search for links inside the main selector. This means that if we have multiple tabbedcontent with the same layout for the links, the plugin will get a bit crazy.
Instead of doing...
if (!(options.links instanceof $)) {
options.links = $(options.links);
}
I should do something like...
if (!(options.links instanceof $)) {
options.links = tabcontent.find(options.links);
}
I would like to see a close tab method.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
hi
when i try to use next and previous next jumps to first tab and previous to last
please see this link i manage to reduce the code
the problem if if there are other li with the class active it doesn't work even when you specify what links target the tabs
Hi,
I guess api.switch
on init event doesn't change the addressbar hash, which may be a problem on page refreshes. Does anybody experienced this on init event? or is it just me?
Using node.js, like I did in password-strength-meter
I have a problem with browser scrolling from tab button to button target.
When I click on link Chrome browser scrolls to anchored ID, while in Firefox scrolling is disabled.
Is there any way to disable browser scrolling in Chrome?
EDIT:
I already tried to add 'pointer-events: none' to the '.active' tab, but it doesn't work
When user click on the tabs ,page content get moved up and it get position to the hash tag place, due to which tabs get moved up and get hidden if we have have more content in each tabs content section and user view port will be focus on content. This behavior is only in chrome.
How can we use position the document such that tabs as visible. we tried using
document.getElementById('productTab').scrollIntoView();
but this does not work as click event of tabs overrides this setting.
Once again, it's me.
One could write a sister function that counts divs, and uses that number to determine whether getCurrentTab is the first or the last or not, but I thought it might be useful to build it into the plugin, since you are counting them anyhow. The api then could use mytabs.last() mytabs.first() as booleans so that one could use a function like
function tabNavToggler() {
var firstTab = mytabs.first()
var lastTab = mytabs.last()
if(firstTab) {
$('#previousTab').fadeTo(0, 0);
$('#nextTab').fadeTo(0, 100);
} else if(lastTab) {
$('#previousTab').fadeTo(0, 100);
$('#nextTab').fadeTo(0, 0);
} else {
$('#previousTab').fadeTo(0, 100);
$('#nextTab').fadeTo(0, 100);
}
}
I would like to see a feature that would mimic the "previous/next" icons like the following ui frameworks:
http://element.eleme.io/#/en-US/component/tabs
http://jqwidgets.com/jquery-widgets-demo/demos/jqxtabs/index.htm
http://examples.sencha.com/extjs/6.5.0/examples/kitchensink/?classic#basic-tabs
I would like to see an Add Tab method.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I'm doing this sort of thing for next and previous buttons, resetting tabs to zero so that it works, is there a way to get current tab index?
mytabs.switch(0); // note that first tab begins at 0
var targetTab = 0;
$('.nextTab').click(function(){
mytabs.switch(targetTab+1);
targetTab++
});
$('.prevTab').click(function(){
mytabs.switch(targetTab-1);
targetTab--
});
If you have a base tag in html, then switching a tab cuts off portion of url. Only base url + the Tab hash is shown in url.
Allow the user to add the .active
class to tabs and fallback to that tab if there are no other ways to open tabs (like an error or a #url
).
Some symfony users use composer to install assets. Then they use the "asset install" feature from symfony to move them to their proper place.
Add a composer.json
file and register this package in packagist.
hi
is there any way to stop the page jump on click on active tab link and if scrollbar present
test here
Hello, it is me again with yet another feature request. Any chance of adding a callback to fire a function? Example, I have next and previous buttons using the new api, and I want to hide the disabled ones for the first and last slide. I can make it run the following for onclick of those buttons, but if one switches using the regular tabs, it does not work as the getcurrent reads the div at the moment where someone clicked it, and not the one they actually clicked to go to.
var currentTab = mytabs.getCurrent();
if(currentTab == 0) {
$('#prev').fadeTo(0, 0);
$('#next').fadeTo(0, 100);
} else if(currentTab == 2) {
$('#next').fadeTo(0, 0);
$('#prev').fadeTo(0, 100);
} else if(currentTab == 1) {
$('#prev').fadeTo(0, 100);
$('#next').fadeTo(0, 100);
}
Hello,
great tabs! i'm currently trying to use them for a project i`m working on and i have 2 questions:
Is there any way to change the current animation (slide from top left to bottom right) to a simple "fade" animation?
Also, if i enable "currentClass", only the tab buttons receive a ".current" class on click. Is there any way to add the .current class to the tab content DIVs items as well?
thank you & best regards!
andi
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.