On 28 June 2015 at 11:46, Padmahas Bn <[email protected]> wrote: >>> <td> >>> <!-- Modal --> >>> >>> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" >>> aria-labelledby="myModalLabel" aria-hidden="true"> >> >> This is your problem: all of your modal divs have the same id and it would >> seem that the javascript triggering the modal identifies the div by id. Ids >> are supposed to be unique, so it just uses the first div it finds with that >> id. You could make the myModal id change for each instance (and obviously >> change the link to) or perhaps whatever you are using for your modals >> supports more complex expressions for data-target > > > Hello Fred how can I change the id's of each model? I cannot hard code it to > the modal right ? And if it matters, I'm using bootstrap modal instead of > JavaScript MODAL. Does this change the way of changing modal id with respect > to bootstrap? Also is is easy if I use JavaScript for this kind of MODAL?
It is not the model id you need to change just the bit in the html where it says id="MyModal", you need that to be different for each element. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvd1HGmdSu1Op0cn-PUrebMneAkD%2B9gEhh9ZMP1BxDS%2Bg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

