$("#note_content").dialog({
title: "Note",
modal: true,
width:'auto',
height:'auto',
resizable:false,
open: function(){
var note_text = $('#note_content').attr('note_text');
}
}
In my code I am trying set note_text as content of dialog, any idea how could I do this?
JQuery Modal is an overlay dialog box or in other words, a popup window that is made to display on the top or 'overlayed' on the current page. It is a pop up modal box that is converted into the viewport deliberately for the user to interact with before he can return to the actual site.
The close() method of the HTMLDialogElement interface closes the dialog. An optional string may be passed as an argument, updating the returnValue of the dialog.
jQuery is a lightweight, "write less, do more", JavaScript library. The purpose of jQuery is to make it much easier to use JavaScript on your website. jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code.
You can try this: DEMO
var SplitText = "Title"
var $dialog = $('<div></div>')
.html(SplitText )
.dialog({
height: 500,
width: 600,
title: 'Title'});
$dialog.dialog('open');
$dialog.html('Some text');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With