javascript - Show modal dialog on page load -


fiddle: link problem.

<div id="openmodal" class="modaldialog">     <div>         <a href="#close" title="close" class="close">close</a>         <h2>modal box</h2>     </div> </div> 

i want modal box open automatically when page loads.

try in javascript:

window.onload = function () {     document.getelementbyid("openmodal").style.opacity = 1; } 

it won't work in jsfiddle should fine in page


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -