In my case I have an article and inside a few tabs which are generated from component. My goal is switch between tabs via javasript from my SVG file.
js code:
$(window).load(function () {
var tabA = $$('.nn_tabs_nav ul li:nth-child(2) span a');                                                                     //here I obtain the tab element
        var svg = document.getElementById("svg");                                                                          //here I obtain element which cover my svg picture
        var svgElement = svg.contentDocument;                                                                              //get the inner DOM .svg   - here I obtain element from inside svg
        var door = svgElement.getElementById("door-left-contour");                                                   //get the inner element by id

        door.addEventListener("mouseout",function(){tabA.setStyle('color','yellow')});                           // this is functional, I can apply css on variable tabA
        door.addEventListener("mousedown",function(){tabA.click()});                                                // here I want to click on the element tabA, but it does not work
on the row where I set click on tabA I get error (Opera browser / Dragonfly - breakpoints reports: )
Unhandled Error: 'tabA.click' is not a function
strange because on the tabA is possible use another function like in my case tabA.setStyle, why the function .click does not work?

thank YOu