I have a date script that opens a dropdown when you click inside the search box. It works on the main page (as demonstrated in the link I have given) and works inside the modal as well, HOWEVER – it only works inside the modal if you open the modal with the datescript first, and not navigate to it from a different modal. I tried the colorbox forums but I received no reply. Please see this link for the example 🙂
Tips: The modal is closed by clicking ‘take me straight to the map’ or by refreshing the page
Thank you everyone 🙂
I have an idea of what happened though, do you call $(‘input’).daterangepicker({arrows:false}) after you load each new modal?
It’s called during document.ready (the first input), and on Complete for the first modal (thus it works for example link) but when you move between modals, you are generating new HTML that wasn’t there before, so you need to call it again.
This is my guess, I had trouble figuring out where your code was. I recommend separating your vendor javascript (not yours) from your own javascript so it’s easier to tell what belongs to you and what is plugin code.