1
URL을 열기를 원하는 버튼이 포함 된 간단한 팝업이 있습니다. 코딩 된대로 버튼이 활성화되어 있지 않아이 작업을 수행하는 데 올바른 코드를 찾을 수 없습니다.jquery popup : URL을 열기위한 버튼 얻기
기본 JQuery와 스크립트 :
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var id = '#dialog';
$('#mask').fadeIn(1000);
$('#mask').fadeTo("slow",0.4);
var winH = $(window).height();
var winW = $(window).width();
$(id).css('top', winH/2-$(id).height()/2);
$(id).css('left', winW/2-$(id).width()/2);
$(id).fadeIn(5000);
$('.window .close').click(function (e) {
e.preventDefault();
});
});
키 버튼의 코드는 다음과 같습니다
$('#element_to_pop_up').bPopup({
content:'iframe',
contentContainer:'#content',
loadUrl:''
});
이를 :
<div id="content">
<a class="button green" href="http://www.google.com">Goto Url</a>
</div>
내가 스크립트 추가 버튼을 활성화하려면 스크립트는 어떤 제안이 jQuery를 함수를 호출하는
고마워요, 고마워요. 고쳐 준 덕분에 완벽하게 작동합니다. –
너무시기 상조 였고, 수정 작업으로 인해 팝업이 작동했지만 버튼이 활성화되지 않았습니다. 접두사 # 또는. 가기?