In a project where we use Bootstrap, we have a page where lots of partial tempaltes can be loaded in the centre, using ajax.
In a partial template, I have a modal, but it doesn't work, because the behaviour needs to be bound somehow. I could manually bind it as part of the template, but I feel this is too messy. I'd like to be able to "refresh the API to allow the behaviour i need.
I've seen that the following function $(document).off('.data-api')
will unbind all the functions associated with that API.
Is there an equivalent where I can manually turn it back on? Or otherwise update the binding in a general way that takes care of any new content?
Perhaps I'm going about this the wrong way and another solution or approach is better?