app.js optimisations.
This commit is contained in:
parent
25e93dba69
commit
681ff2e1cf
@ -15,11 +15,11 @@ $(document).ready(function() {
|
||||
|
||||
tabs.each(function(i) {
|
||||
//Get all tabs
|
||||
var tab = $(this).children('li').children('a');
|
||||
var tab = $(this).find('a');
|
||||
tab.click(function(e) {
|
||||
|
||||
//Get Location of tab's content
|
||||
var contentLocation = $(this).attr("href") + "Tab";
|
||||
var contentLocation = this.href + "Tab";
|
||||
|
||||
//Let go if not a hashed one
|
||||
if(contentLocation.charAt(0)=="#") {
|
||||
@ -31,8 +31,7 @@ $(document).ready(function() {
|
||||
$(this).addClass('active');
|
||||
|
||||
//Show Tab Content
|
||||
$(contentLocation).parent('.tabs-content').children('li').hide();
|
||||
$(contentLocation).show();
|
||||
$(contentLocation).show().siblings().hide();
|
||||
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user