I can normally find the parent or appropriate sibling of the event target using something like
$(".occupancy").bind("click", function(event){
day = $(event.target).parent().attr("class");
// more stuff
});
But if the event is triggered on an svg object for example
$(".booked").on("click", function(event) {
day = $(event.target).parent().attr("class");
$("#cancellation_Form_Wrapper").css("visibility","visible");
$("#cancellation_Form_Wrapper").change();
}).svg({loadURL: '../_public/_icons/booked.svg'});
parent is undefined.
I appreciate that the svgdom varies from the normal DOM and have implemented jquery.svgdom.min.js. But I am not interested in the internal DOM of the SVG I am interested in where the SVG sits within the DOM.
I have tried to add a wrapper to the svgdom and then look for the parent of the wrapper. But that didn't work either. Any clues as to how this may be achieved?