Resolve IE 7 incorrect href="" value issue. .x_tabbable UI component.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11706 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ChanMyeong 2012-10-15 08:51:55 +00:00
parent 1f556831f2
commit 72175112cb
2 changed files with 22 additions and 4 deletions

View file

@ -34,11 +34,20 @@ jQuery(function($){
return false;
});
// Tab Navigation
$('.x .x_tabbable').each(function(){
var $this = $(this);
$this.find('>.x_nav-tabs>li>a').each(function(index){
$(this).attr('data-index', index+1);
});
$this.find('>.x_tab-content>.x_tab-pane').each(function(index){
$(this).attr('data-index', index+1);
});
});
$('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide();
$(document.body).on('click', '.x .x_nav-tabs>li>a[href^="#"]', function(){
$(document.body).on('click', '.x .x_nav-tabs>li>a[href*="#"]', function(){
var $this = $(this);
$this.parent('li').addClass('x_active').siblings().removeClass('x_active');
$this.closest('.x_nav-tabs').next('.x_tab-content').find($this.attr('href')).addClass('x_active').show().siblings().removeClass('x_active').hide();
$this.closest('.x_nav-tabs').next('.x_tab-content').find('>.x_tab-pane').eq($this.attr('data-index')-1).addClass('x_active').show().siblings().removeClass('x_active').hide();
return false;
});
// GNB

View file

@ -34,11 +34,20 @@ jQuery(function($){
return false;
});
// Tab Navigation
$('.x .x_tabbable').each(function(){
var $this = $(this);
$this.find('>.x_nav-tabs>li>a').each(function(index){
$(this).attr('data-index', index+1);
});
$this.find('>.x_tab-content>.x_tab-pane').each(function(index){
$(this).attr('data-index', index+1);
});
});
$('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide();
$(document.body).on('click', '.x .x_nav-tabs>li>a[href^="#"]', function(){
$(document.body).on('click', '.x .x_nav-tabs>li>a[href*="#"]', function(){
var $this = $(this);
$this.parent('li').addClass('x_active').siblings().removeClass('x_active');
$this.closest('.x_nav-tabs').next('.x_tab-content').find($this.attr('href')).addClass('x_active').show().siblings().removeClass('x_active').hide();
$this.closest('.x_nav-tabs').next('.x_tab-content').find('>.x_tab-pane').eq($this.attr('data-index')-1).addClass('x_active').show().siblings().removeClass('x_active').hide();
return false;
});
// GNB