funbinod Posted October 7, 2014 Share Posted October 7, 2014 I wish to load some external pages to the page with document load function. I mean when page loads I want them to be loaded to the page to respective ids without any click or anything. I tried the following-- $(document).ready(function(e) { $(document).load(function(e) { $("#suncr").load("suncr.php?m=8"); $("#sundr").load("suncr.php?m=9"); $("#cnb").load("suncr.php?m=6"); $("#cstock").load("cstock.php?"); });}); why this code is not working? can anyone guide.... Link to comment Share on other sites More sharing options...
dsonesuk Posted October 7, 2014 Share Posted October 7, 2014 $(document).load(function(e) { should not be required. $(document).ready(function(e) { runs after the page is fully loaded and then proceeds to go through the rest of code after this. what error did you get? 1 Link to comment Share on other sites More sharing options...
kodejuice Posted October 26, 2014 Share Posted October 26, 2014 //try this$(document).ready(function(e) {$("#suncr").load("suncr.php?m=8");$("#sundr").load("suncr.php?m=9");$("#cnb").load("suncr.php?m=6");$("#cstock").load("cstock.php?");}); 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now