Hello...I have a modal on my page that displays okay when I click a text 
link on the page (see www.jimhaslam.com/aftec/index.html for an example, 
and the link to open the modal is at the very bottom-left of the page).

However, I want to make it open automatically using onLoad with a 5-second 
delay. No clicking!
I am trying to convert the following code that opens the modal with a 
click, and it works:

<a href="#openModal">Open Modal</a>
<div id="openModal" class="modalDialog">
  <div> <a href="#close" title="Close" class="closecta">X</a>
    <h2>Need More Information?</h2>
    <p>Click below to go to our Contact Us page...</p>
    <p class="btn"><a href="contact-us.php"> More Info </a></p>
  </div>
</div>

I am trying to convert this working code above (using a link) so it will 
open the modal automatically with a 5 second delay...
I have tried several jquery and javascript timed event codes...such as:

*(This in the head wrapped in script tags...)*

function showIt() {
      document.getElementById("openModal").style.display = "block";
    }


*(...with this in the body element...)*

onLoad='setTimeout("showIt()", 5000);'


(and my div id...)

div id="openModal" 


But all so far have not worked. Does anyone know a way to make this work? 
Something seems to be blocking it from working. 

I am using HTML5, CSS3, and Bootstrap Responsive Design code.

Thanks. 

-- 
You received this message because you are subscribed to the Google Groups 
"twitter-bootstrap" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to