This is the bridge over the harbour in Douglas, dividing the outer harbour (big vessels) from the inner harbour (yachts and other small vessels).
To let masted vessels out of the inner harbour it opens. The blue structure swings up and so the road also does. (Don't worry - there are lights and barriers to stop people inadvertently plummeting over and landing on the passing yacht!)
A TT visitor has just posted a video of it doing just that on FB, asking "Anyone know how this actually works?"
Someone actually does explain the hydraulics, but there are a number of suggestions that it is all done by 'electrickery' or just straight forward magic. But my favourite explanation is
"Hundreds of fairies are employed to run to one end inside those big blue bits. The transfer in weight makes it go up, then to make it come down they all run back to the other end."
Seems reasonable to me...