jQuery .load() not working

前端 未结 4 480
日久生厌
日久生厌 2020-12-10 12:46

On my website, I\'m trying to pull the content of a post in my forum (hosted on the same domain) and display it in a div on the homepage, using jQuery.

Here\'s the c

4条回答
  •  长情又很酷
    2020-12-10 13:42

    Check this code. you should use ">*" after container id to load content specific container on the page.

    jQuery('#contain').load("http://example.com/pageurl #somecontaineronpage >*",function(){
          //after loading completion code goes here                      
    });
    

    Hope, this will help

提交回复
热议问题