버튼을 show|hide 토글
본문
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.5.2.js'></script>
<script type='text/javascript'
src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css">
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$('#submit_btn').button();
$('#hide_btn').toggle(function(){
$(this).prev('span').find('span.ui-btn-text').text("Show Submit Button"); //Change the text of the button
$('#submit_btn').closest('.ui-btn').hide();
},
function(){
$(this).prev('span').find('span.ui-btn-text').text("Hide Submit Button"); //Change the text of the button
$('#submit_btn').closest('.ui-btn').show();
});
});//]]>
</script>
</head>
<body>
<input type="button" id="hide_btn" value="Hide Submit Button"
data-inline="true" />
<input type="submit" id="submit_btn" value="Submit" data-theme="e"
data-inline="true" />
</body>
</html>
- 이전글버튼 슬라이드 다운 15.05.25
- 다음글버튼에 마우스 오버 설정 15.05.24