Reputation: 1700
How can i open the delete
bootstrap modal after page load if the URL has a HASH
with an id
parameter?
Example:
http://example.com/properties#delete-86
Upvotes: 0
Views: 1160
Reputation: 4510
You could do at the begining of your script :
// You can retrieve the id in 'matches' variable if needed
if (matches = window.location.href.match(/#delete-([0-9])+/))
{
$('#my-modal').modal('show');
}
Upvotes: 2