When I remove or comment out the alert statement it fails.

     $('#div_db, #div_tables, #div_data, #div_nav').hide();  
alert('line 5');    

Recommended Answers

All 2 Replies

By "fails", what do you mean?

What comes to mind is the blocking nature of an alert(). It blocks execution while awaiting your click. Removing the alert would remove the block.

It's going fine here in a test. It hides the divs, loads a text file and shows the div regardless of the alert being present.

I solved the problem by moving different parts of the script to different files.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.