2012-10-17 4 views
0

작동하지 않습니다, 나는 기간을 지정하려고하지 않는 한 잘 작동 :jQuery를 숨기기 내가 SVG 요소를 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); 
관련 문제