data-target in html
snippet in html

javascript modal close

user8875

$('#closemodal').click(function() {
    $('#modalwindow').modal('hide');
});

data-target in html

user2804

Notice the link element has two custom data attributes: 
data-toggle and data-target . The toggle tells Bootstrap what to do 
and the target tells Bootstrap which element is going to open. 
So whenever a link like that is clicked, 
a modal with an ID of “basicModal” will appear