How do I avoid flashing the un-enhanced DOM-element before my javascript has converted it into another type of element?
To be case specific: I have a select with multiple choices, which is converted via a jquery-plugin to a multi-choice-drop-down. But on page load it renders as the multiselect before the plugin runs.
Right now I'm just hiding the select until it's converted, but that leaves an empty space where the dropdown will show up.
Is there any good way avoid this kind of flickering?
Without Javascript:
So this is the situation, the things I've seen about progressive enhancement so far is just to add some CSS to the flickering dom elements, but since this is rather a transformation I'd like to render something in the place where it's supposed to be.
I hope it's clear what I'm trying to achieve here, any good solutions? Should I render a normal drop-down on the place as a placeholder and then replace it when the DOM is ready? How do I handle the no-js case in that case? The site needs to be available to everyone.