The general phrase "dancing on the table" usually refers to someone so excited - often because of drunkenness and often in a bar or restaurant - that they cannot stop themselves 'performing' in this manner. In other words, their action is a display of sheer exuberance, joy and self-publicity. Someone might tell them the following morning, "Well, you were dancing on the table last night, weren't you!"
As I said, I don't know why Esmeralda may have danced on a table, but - assuming she danced at all - I do not suppose these were the ideas uppermost in her head! More probably because of desperation for some reason.