Reputation: 407
I am having a problem opening up my modal. I am not sure where the problem lies. rental_id is the primary key for the table in database.
<script>
function detailsmodal(rental_id){
var data = {"rental_id" : rental_id};
jQuery.ajax({
url : <?=BASEURL;?>+'includes/detailsmodal.php',
method : "post",
data : data,
success: function(data){
jQuery('body').append(data);
jQuery('#quote').modal('toggle');
},
error: function(){
alert("Something went wrong!");
}
});
}
</script>
Upvotes: 0
Views: 256
Reputation: 906
Bootstrap has a few functions that can be called manually on modals:
$('#quote').modal('toggle');//"toggle" not working sometimes
$('#quote').modal('show');
$('#quote').modal('hide');
You can see more from here: http://getbootstrap.com/javascript/#modals
Upvotes: 1
Reputation: 722
use
jQuery('#quote').modal('show');
as i noticed "toggle" not working sometimes
Upvotes: 2