 <p>The class is being applied by the date picker plug-in, probably using the <code>addClass</code> function. The plug-in, when it's initialized, probably creates a <code>DIV</code> (<code>id=;dp-popup'</code>) that has the necessary values for the current month. That <code>DIV</code> is hidden (<code>display:none</code>) but still has the class of dp-popup when first initialized. When you click in the textbox or click the button, there's an event handler assigned to those events (<code>focus</code> for the textbox, <code>click</code> for the button) that sets the display style of the <code>DIV</code> to not be hidden and it also positions it right below the text box.</p> <p>I didn't dig into the code a whole lot, but looking at the markup a little, that's how I suspect it's working.</p>