I have a div on my page where I would like to display comments stored in a database. now what i want to understand is how the jquery live() function works. if I bind a click to an element say the div, then do I have to click? I just want the comments to be drawn and shown when the page loads or reloads.
Share
If you only want to retrieve the comments when a page loads, then you don’t need to involve any other event then load, which can be done in the main jquery code (assuming you have everything wrapped in an onload function).
so something like:
where getcomments.php is a script that gets the comments and returns them in the html format you want the comments to be in within the div.