I have problem with semantic-ui modal, when I click order, I would show modal, but modal is not working well. After I click order modal, the modal just showed and then closed by itself.
view code
<div class = "ui form grid_6 omega">
<form target="paypal" method="post">
<div class="field1">
<div class="field">
<label>Nama</label>
<input placeholder="Nama" name="nama" type="text">
</div>
<div class="field">
<label>No. HP</label>
<input placeholder="No. HP" name="handphone" type="text">
</div>
<div class="field">
<label>Alamat</label>
<input placeholder="alamat" name="alamat" type="text">
</div>
<div class="field">
<label>Jumlah</label>
<div class="selectbox">
<select name="jumlah" id="">
<?php for ($i=1; $i <= 20; $i++): ?>
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php endfor; ?>
</select>
</div>
</div>
<button type="submit" name="submit" class="ui teal button order-button">Order now</button>
</div>
</form>
</div>
<div id="modaldiv" class="ui small modal">
<i class="close icon"></i>
<div class="header">
Smalls Like Bakin
</div>
<div class="content">
<p>Thank you for your order</p>
</div>
<div class="actions">
<div class="ui positive right labeled icon button">
<a class="text-white" href="<?php echo site_url('home/order');?>">Back to Home</a>
<i class="checkmark icon"></i>
</div>
</div>
</div>
script modal
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" />
<script type="text/javascript" src = "<?php echo base_url(); ?>packaged/javascript/semantic.js" />
<script type = "text/javascript" >
$('.order-button').click(function () {
$('#modaldiv').modal('show');
});
</script>
Can you help me to solve this problem? thank you.