I have a <div id="myPost>"
that is populated with the Jquery clone code $(this).clone().appendTo('#myPost');
.
I want the users to click in this div, so it will take them to another page. How can you do nest an a href
tag in the clone?
The blue area is the cloned part that should be clickable and take you to another page. The blue area has a div
called #myPost
. So I want to add a link to the following page: #individualProfile
. I dont want to add more code because div #myPost
gets data from the server via ajax. But I guess my question is how to add an anchor tag inside #myPost
when it cloned.
将一个子元素追加到克隆 – meskobalazs 2014-11-20 16:58:35
您可以给我们一个关于最终结果的HTML表示吗?你能告诉我们你试过了什么吗? – PeterKA 2014-11-20 16:59:49
@PeterKA,我知道它似乎很少代码,但我想我所看到的并不需要很多代码。我从另一个名为'#myListView'的div中克隆了#myPost。然后,当被克隆时,我想让用户点击div##myPost(被克隆的),将它们链接到另一个页面。 – user3356128 2014-11-20 17:31:23