2012-10-17 24 views
0

我正在使用SVG元素jQuery的隱藏功能工作,除非我嘗試指定時間正常工作:Jquery的隱藏不具有持續時間的

// Hide the object: works fine 
$('#id').hide() 

// Doesn't work with time specified in any of these attempts including fadeout 
$('#id').hide('slow') 
$('#id').hide(400) 
$('#id').hide(400, function() {console.log('done')}) 
$('#id').fadeOut() 
$('#id').fadeOut(400) 

編輯:這是控制檯顯示:

// Works 
$('#HTI2010').hide() 
[ 
<circle cx=​"50" cy=​"450" id=​"HTI2010" r=​"10" class=​"c2010" title style=​"display:​ none;​ ">​</circle>​ 
] 

// Doesn't work: display is set to in-line instead of none: is there an argument I can alter to change this? 

$('#HTI2010').hide(400) 
[ 
<circle cx=​"50" cy=​"450" id=​"HTI2010" r=​"10" class=​"c2010" title style=​"display:​ inline;​ ">​</circle>​ 
] 

對象保留在這些屏幕上。我錯過了什麼嗎?謝謝,

+0

必須有瀏覽器的一些具體錯誤。 – hjpotter92

+1

你可以在jsfiddle上發佈代碼嗎? – jorgebg

+0

在這裏工作http://jsfiddle.net/j08691/DbRMD/(雖然它很醜陋)。 – j08691

回答

0

試試這個:

var duration = 400; 

$('#id').hide(duration); 
相關問題