2012-04-20 3 views
0

selectmenu jquery plugin을 동시에 사용하여 select ($('option').hide())에서 옵션을 제거하거나 숨기려고하면 제거 할 옵션이 계속 표시됩니다. selectmenu를 파괴 한 후 나는 평범한 html 드롭 다운 선택을 볼 것이고 옵션을 제거했다. 내가 도대체 ​​뭘 잘못하고있는 겁니까?jquery selectmenu plugin에서 옵션을 숨기는 방법

+1

모든 소스 코드? – sp00m

답변

2

옵션을 변경하거나 제거한다고 가정 해보십시오. 그것은 최선의 선택이 아니다

$("select#speedC").find("option:first").remove(); 
//and then you can refresh with 
$("select#speedC") 
.selectmenu("destroy") //destroy the custom select menu 
.selectmenu({style:'dropdown'}); //replace with the new custom select menu 

하지만, 새로 고침이 작동하지 않는 것 같습니다 :

당신은 방화범 콘솔 또는 비슷한함으로써 데모 페이지 http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/index.html 과 그것을 시도 할 수 있습니다.

알려주세요. Donato.

관련 문제