0
I made a form with Jquery accordion and at the end a submit button. After pressing the button should appear a pop up message, but is giving error. My pop up appears when the page starts and this button is kind of useless because the pop up should come later. Someone can help me?
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script> <!--- jQuery UI “Submit” button --->
$( function() {
$( ".widget input[type=submit], .widget a, .widget button" ).button();
$( "button, input, a" ).click( function( event ) {
event.preventDefault();
});
});
</script>
<!--- jQuery UI Dialog message --->
<script>
$( function() {
$( "#dialog" ).dialog();
});
</script>
<div class="widget">
<input type="Submit" value="Submit"/>
</div>
<div id="dialog" title="Order Complete">
<p>Your order has been placed.</p>
</div>
The question is a bit confusing. You could try to detail it better and add a visible example (using jsfiddle for example of the problem?
– Chun
I believe that
button()
not a method. But I would like to see this whole part of the code to leave a better answer to the question.– Chun
ok I’ll try to put the code in a clearer way
– Wagner Gualberto
But what I need eh: - to create a button using Jquery; - to create a dialog box(pop up) using Jquery; - and finally to make the pop up appear only when I click this button
– Wagner Gualberto
I have obtained these functions from this site: https://jqueryui.com/button/
– Wagner Gualberto
i do not know why the site does not allow me to put the body part in the question in a clean way. In this case the Divs are from the body part
– Wagner Gualberto