mjsilva mjsilva - 1 year ago 102
Javascript Question

After all $(document).ready() have run, is there an event for that?

I have a first.js file included in the page index.php that have something like this:


$("#my_slider").slider("value", 10);


And them in index.php I have some dynamicly created slidders:

<?php function slidders($config, $addon)
$return = '
<script type="text/javascript">
$(function() {
min: '.$config['min'].',
max: '.$config['max'].',
step: '.$config['step'].',
slide: function(event, ui) {
change: function(event, ui) {
return $return;
} ?>

The problem is, because my index.php sliders are being instantiated after my first.js I can't set up a value there, is there any event like "after all $(document).ready() have run" that I can use in first.js to manipulate the sliders created in index.php?

Answer Source

Dont know how to tell when the last $(document).ready() function fired, but $(window).load() function fires after the $(document).ready()

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download