Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run javascript after page load

setup_account ui-mobile-viewport ui-overlay-c

When a page i make loads like this:

var location    =   location.href+"&rndm="+2*Math.random()+" #updatecomment0>*"
$("#updatecomment0").load(location, function(){});

I have multiple scripts running on the updatecomment0 div:

<div id="updatecomment0">
    <div id="javascript1">hi</div>
    <div style="float:right;" class="javascript2">delete</div>
</div>

I don't know how to make this other JavaScripts run after page load.
Can someone please tell me how to with this.
Thank you

like image 552
Benyamin Avatar asked Apr 01 '11 05:04

Benyamin


1 Answers

Use $(document).ready().

like image 86
Chetan Avatar answered Oct 04 '22 04:10

Chetan