Skip to main content

Posts

Showing posts with the label modal

facebook type lightbox with comments system

After trying few available lightbox plugins and trying to put or intergrate a comment system into it like facebook has, I can't seem to find a way to find out how to do it. All the lightbox plugin have all the code in js file and using php inside any js file is like inviting sql injections. Can any one really help me telling a way to do it? I know we can take a div as popup and then show comments and photo both, but then how to bring the next pic or the previous pic functionality. I wasted about 15 days on this but no success, also read some stackoverflow post, they all refer to lightbox such as color box, etc, but have tried em. Any help?

Grey boxes appear in parts of embedded Google Map in modal box

I'm having a problem with embedding a Google Map via the v3 API in a modal box. Grey boxes appear in the map canvas when the modal is shown. Resizing the browser window, bringing up Web Inspector, etc. makes all map tiles visible, i.e. it "force re-render" the map. The parent element of the map element ( section#map-modal , see code below) has display: none set in its CSS on page load. The JS modal code automatically sets display: block when the show button is clicked. If I temporarily remove display: none from the modal element, the map renders correctly on page refresh. Isn't the Google Map liking having a hidden parent element? I'm using Twitter's Bootstrap modal jQuery plugin, and am controlling the modal itself with CSS. It's fixed positioned, have a pixel width, etc. Nothing unusual. I've of course googled around for solutions, and many points to the Google API method of triggering the resize event: google.maps.event.trigger(map,