How to close the respective modal dialog when switch over to other modal dialog without overlapping [Resolved]

Posted by Atmansangeetha under Bootstrap on 10/22/2016 | Points: 10 | Views : 289 | Status : [Member] | Replies : 3
Register-modal1,login-modal2 and forgot-modal3 page showing in model-dialog popup using bootstrap 3.Its working fine ,but when switch over to other model2 popup through anchor tag with in the popup model 1 ,which is overlapping model1(model2 overlapping on model1). Instead of overlapping it ,I just need to close it model1 when switch over to model2.

Please help me out, how to achive this by bootstrap 3




Responses

Posted by: Rajnilari2015 on: 10/22/2016 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
Create a function and invoke the function from some control event e.g.

function openModal(){
$('.someModal').modal('hide');
$('.someModal').on('hidden', function () {
$('#NewModalID').modal('show');
})
}


--
Thanks & Regards,
RNA Team

Atmansangeetha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Atmansangeetha on: 10/23/2016 [Member] Starter | Points: 25

Up
0
Down
Hi Rajnilari2015,


Thank you , I have fixed my issue with your code suggestion without on(hidden,function). I have one doubt in that, why that on('hidden') function.is this buit in bootstrap hidden event of modal dialog?

Atmansangeetha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajnilari2015 on: 10/23/2016 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Up
0
Down
@Atmansangeetha Sir,

It's only to make sure that other modals with same class are closed while a new one opens.

Hope that clears the doubt.

--
Thanks & Regards,
RNA Team

Atmansangeetha, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response