Here is working example:
http://jsbin.com/lehehokumu/1/edit?html,output
The ID of the element stays the same all the time and you can call for it whenever you like.
It doesn't matter what ID you see when you explore that particular element with your HTML inspector.
Again, maybe I'm missing something in what exactly you eant to achieve.