javascript - Run Multiple Scripts after Page Loads -
i have following javascripts:
<script type="text/javascript"> $('#homeslideshow ul.images').jslideshow({ auto: true, delay: 15, indicators: '#homeslideshow ul.indicators' }); </script> and:
<script type="text/javascript">window.onload = function () { document.getelementbyid('features').style.visibility = 'visible'; };</script> i combine first script onload function of second script. both scripts run once page loaded.
this run once dom has been loaded. http://api.jquery.com/ready/
$(document).ready(function() { $('#homeslideshow ul.images').jslideshow({ auto: true, delay: 15, indicators: '#homeslideshow ul.indicators' }); document.getelementbyid('features').style.visibility = 'visible'; }); or short hand .ready()
$(function() { $('#homeslideshow ul.images').jslideshow({ auto: true, delay: 15, indicators: '#homeslideshow ul.indicators' }); document.getelementbyid('features').style.visibility = 'visible'; });
Comments
Post a Comment