2015-08-28 47 views
-1

我遇到问题。一旦图像被点击,我需要在它下面添加一个div,这个div需要包含来自与这个图像相关联的链接的内容。如果感到困惑,请看这个链接http://grovemade.com/ 我需要类似于我们的团队部分的功能。我试过各种资源,没有太多的帮助。如果任何人都可以指出我正确的方向,它将非常感激。使用php ajax和jquery添加div中的内容

回答

0

你可以使用这样的事情,

$(document).on('click','yourButton',function() { 
    $("YOURDIV").load(url, { somedataforphp : somedataforphp }, 
    function(responseTxt) { 
     // maybe a callback? or maybe appand responseTxt into the div under the image 
    }); 
});