jquery modal 완성~~
$(document).ready(function() {
$('a[name=modal]').click(function() {
var $this = $(this);
var url = $this.attr('href');
var dialogOpts = {
title: ($this.attr('title')) ? $this.attr('title') : '내용보기',
autoOpen: true,
bgiframe: true,
width: 670,
height: 500,
modal: true,
resizable: true,
autoResize: true,
buttons: {
"닫기": function() {
$(this).dialog("close");
}
}
};
$("#modal_view").dialog(dialogOpts);
$("#modalIFrame").attr('src',url);
return false;
});
});
문디 같은거 그냥 아이프레임가져오면 간단한걸 머리만 엄청썻네요
달력스킨 팝업띄우실때 굿입니다.
$('a[name=modal]').click(function() {
var $this = $(this);
var url = $this.attr('href');
var dialogOpts = {
title: ($this.attr('title')) ? $this.attr('title') : '내용보기',
autoOpen: true,
bgiframe: true,
width: 670,
height: 500,
modal: true,
resizable: true,
autoResize: true,
buttons: {
"닫기": function() {
$(this).dialog("close");
}
}
};
$("#modal_view").dialog(dialogOpts);
$("#modalIFrame").attr('src',url);
return false;
});
});
문디 같은거 그냥 아이프레임가져오면 간단한걸 머리만 엄청썻네요
달력스킨 팝업띄우실때 굿입니다.
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 8개
하드 ... 소프트 넘나들며 ... 왕중의 왕 ... 이라구요 ....
슬쩍 집어가서 써봐도 될까요....ㅎㅎ
body에
<div id="modal_view"><iframe id="modalIFrame" width="600" height="390" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="no" title="Dialog Title"></iframe></div>
추가해주세요
modal이 필요한곳에 name=modal테그 추가하시면 걸러있는 링크를 아이프레임에 뿌립니다.
-_-스크랩 ㅎㅎㅎ
웅캉캉캉 ㅋㅋ