///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
출처: http://stackoverflow.com/questions/8079674/jquery-ui-alert-dialog-as-a-replacement-for-alert
5 Answers
I don't think you even need to attach it to the DOM, this seems to work for me: Here's a JS fiddle: |
|
add comment |
Using some of the info in here I ended up creating my own function to use. Could be used as... jQuery UI Alert Replacement |
|
add comment |
DAlert jQuery UI Plugin Check this out, This may help you |
|
add comment |
$("").html("YOUR MESSAGE").dialog(); this works but it append a node to the DOM. You can use a class and then or first remove all elements with that class. ex: |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
출처: http://simplemodal.plasm.it/#download
HOW TO USE
SIMPLEMODAL is very simple to use; here are 4 ways to create SIMPLEMODAL: simple alert message, modal window, modal window with a single asynchronous call and lightbox.
ALERT INTEGRATION
1 2 3 4 5 6 7 |
$("myElement").addEvent("click", function(){ var SM = new SimpleModal({"btn_ok":"Alert button"}); SM.show({ "title":"Title", "contents":"Your message..." }); }); |
MODAL INTEGRATION
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$("myElement").addEvent("click", function(){ var SM = new SimpleModal({"btn_ok":"Confirm button"}); SM.addButton("Action button", "btn primary", function(){ alert("Add your code"); this.hide(); }); SM.addButton("Cancel", "btn"); SM.show({ "model":"modal", "title":"Title", "contents":"Your message..." }); }); |
MODAL-AJAX INTEGRATION
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
$("myElement").addEvent("click", function(){ var SM = new SimpleModal({"width":600}); SM.addButton("Action button", "btn primary", function(){ this.hide(); }); SM.addButton("Cancel", "btn"); SM.show({ "model":"modal-ajax", "title":"Title", "param":{ "url":"ajax-content.php", "onRequestComplete": function(){ /* Action on request complete */ } } }); }); |
MODAL-IMAGE
1 2 3 4 5 6 7 8 9 10 11 |
$("myElement").addEvent("click", function(){ var SM = new SimpleModal(); SM.show({ "model":"modal-ajax", "title":"Image title", "param":{ "url":"http://url-file.jpg", "onRequestComplete": function(){ } } }); });
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
'WEB > jquery' 카테고리의 다른 글
jquery 유저인터페이스 관련 (0) | 2020.09.10 |
---|---|
jQuery 사용법 다운로드 관련 (0) | 2014.06.10 |
jQuery Alert Dialogs (Alert, Confirm, & Prompt Replacements) jQuery 예제 (0) | 2014.06.10 |
댓글 영역