How to call JQuery methods when document id loaded? [Resolved]

Posted by Allemahesh under jQuery on 8/26/2013 | Points: 10 | Views : 1169 | Status : [Member] [MVP] | Replies : 3
I know that when we call the JQuery functions, they will called immediately when the DOM is loaded.
But, How to ensure that we can call all the JQuery function only when document or foam is loaded fully.
Any help.




Responses

Posted by: Bandi on: 8/27/2013 [Member] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
The following link will provide you the detailed explanation of .ready()[/b] function
http://api.jquery.com/ready/
http://stackoverflow.com/questions/6252902/why-doesnt-jquerys-document-ready-from-a-dynamic-append-wait-for-external-sc?rq=1

NOTE:
The windows.load function is useful if you want to do something when everything is loaded.

$(window).load(function(){
// full load
});


Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Allemahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sheonarayan on: 8/26/2013 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hi Alle....

There is a jQuery tutorials written by me on this website under Tutorials section - http://www.dotnetfunda.com/tutorials/jquery/howtodo.aspx, please read that to start working with jQuery.
Here is the way

$(document).ready(function() {        

// write jQury code block here that will ensure that these code blocks will execute when the complete page is loaded
// ........
})


Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Allemahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 8/27/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Dear Narayan,
Please read the my question before posting any answer.
I have not asked JQuery tutorials. My question is "call all the JQuery function only when document or foam is fully loaded".
If you not understand my question, you can ask me to clear my questions.
Happy coding.

Allemahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response