Hopefully simple problem. I click an img link, html like this

<a class="edit-building" href="/edit-building/145">
<img src="icons/edit.png"/>
</a>

jquery like this

if ($(event.target).is('a.edit-building')) {
  var building = function (data) {
  ..do stuff
  }
  $.get(event.target, null, building);
  return false;
}

but the binding doesn't work, probably because the target is my img
not my link. How can I click the image and fire the code for my a.edit-
building?

Thanks!

Reply via email to