How do i click on a link that loads a html page and then using ajax (without clicking anything) load an external html page?

I have page1.html with a link to page2.html and when page2.html is loading i want to load inside it with AJAX the content of page3.html. Can someone provide me with a solution? I have tried this but it doesn't work. Thanks :) This is the code $(document).ready(function () { if (window.location.search == "?istoselides") { $('#loading_content').load('what-we-do/istoselides.html').fadeIn(1000); } if (window.location.search == "?video") { $('#loading_content').load('what-we-do/etairika_video.html').fadeIn(1000); } });
To OP or editor: My apologies if my edits collided with yours (I saw a brief "someone else edited this" message as I submitting the update).

以上就是How do i click on a link that loads a html page and then using ajax (without clicking anything) load an external html page?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏