In this fiddle http://jsfiddle.net/SySRb/105/, function init(); successfully checks for the existence of an id and thereafter hides two divs on page ready.
function test() is supposed, once you click the .start box, to check whether or not those two hidden divs still exist (in terms of are they available to jquery), and, if they do, show a box called “exist” or, if they don’t exist, show “noexist”.
function test isn’t working.
Note, my interest in creating this fiddle was finding out whether, once an id is hidden using jquery, whether it still “exists” or not. However, even if you tell me the answer to that, I still need to make function test() work.
Can you help me make function test work?
Do this:
And it works for me.