작업 데모http://jsfiddle.net/Zvd8J/
jQuery를 보여줄 것이다 .on
이벤트는 여기 만 V 1.7 이상 더 읽기 : What's the difference between jQuery .live() and .on()
더 열렬 해지면 여기를 참조하십시오 : What's wrong with the jQuery live method?
작은 html과 데모를 적어 놓으십시오. 이 도움이
희망, 또한 :)
주의 :이 작업을 수행 할 수 있습니다 :
$(document).on('click','#create-account-btn',function(){
});
코드
$('.hulk').hide();
$('#create-account-btn').on('click',function(){
$('.hulk').hide();
$('#create-account').show();
});
$('#foo').on('click',function(){
$('.hulk').hide();
$('#create-whatever').show();
});
HTML
<div class="hulk" id="create-whatever">
hulk yada yada
</div>
<div class="hulk" id="create-account">
ironman yada yada crea accoutn show
</div>
<input type="button" id="create-account-btn" value="click me" />
<input type="button" id="foo" value="click me to show another" />
'.live()'는 jQuery 1.7. +에서 더 이상 사용되지 않습니다. – honyovk
표시 한 코드에 어떤 문제가 있는지 명확하게 설명 할 수 있습니까? '계정 만들기가 표시됩니다'라고 했으므로 문제가 무엇입니까? – nnnnnn
코드가 잘 작동합니다 ... http://jsfiddle.net/matthewbj/Kk6MR/ – honyovk