In my HTML file I have a div with id="print" and when this div appears on the screen I would like to start function print(). How can I do this?
<div id="print">
</div>
function check(){
//check appear div
}
function print(){
//print data
}
In my HTML file I have a div with id="print" and when this div appears on the screen I would like to start function print(). How can I do this?
<div id="print">
</div>
function check(){
//check appear div
}
function print(){
//print data
}
like @TheShinyTuxedo suggested this can be resolved by adding a script right after the div is rendered.
look like that:
<div id="print">
</div>
<script type="text/javascript">
print();
</script>