I want to click in the div or the img and get the text of the p inside it to go in another list.
<div onClick="add_basket(this);" class="menu-item burger"> <img src="img\McDo\bigmac.png"> <p>Big Mac</p> </div>
<div onClick="add_basket(this);" class="menu-item burger"> <img src="img\McDo\doubleqp.png"> <p>Double Quarter Pounder</p> </div>
<ul class="basket" id="basket-mcdo">
<li>Order</li>
<li>Mcdo</li>
</ul>
and i have a lot of others like that and here is my function but it doesn't work it adds "undefined" is the list
function add_basket(that) {
$(".basket").append("<li>"+that+"</li>");
}
Thank you very much for your help :)