I created a url using Chtml::Link like this:
CHtml::link("Remove", '#', array('class' => 'delete')))
Now, when user clicks it i send a ajax request like this:
$('.delete').click(function(e) {
e.preventDefault();
$.ajax({
url:'" . $this->createUrl('//shop/shoppingCart/delete') . "',
type : 'GET',
data: {id: $position},
success: function(result) {
console.log($(this).parent());
},
});
});
it always logs "undefined
" but the link is inside a td
What i want to do is remove the row containing the link. Any new approach is also welcome. Please help!