I need to get value from paragraph tag
<div id="dialog-confirm" title="<fmt:message key="label.modal.confirmation" />">
</div>
<div style="display:none" id="parent">
<p class="yes"><fmt:message key="button.modal_ok" /></p>
<p id="no"><fmt:message key="button.modal_no" /></p>
</div>
in my javascript function
$(function() {
var butok = $('#parent').children('p.yes').text();
$( "#dialog-confirm" ).dialog({
autoOpen: false,
resizable: false,
height:140,
modal: true,
buttons: {
butok : function() {
window.location.href = partsArray[0];
$(this).dialog( "close" );
},
butno: function() {
location.reload();
$( this ).dialog( "close" );
}
}
});
});
How can i get it? .text() and .html() does not work
tag and put it to the button, if you give me some code it will be really helpfull. Thank you anyway !
– Ilya Aug 24 '15 at 22:24