www.webdeveloper.com
Results 1 to 2 of 2

Thread: Mootools - break point says : Unhandled Error: ...is not a function

Hybrid View

  1. #1
    Join Date
    May 2013
    Posts
    2

    Mootools - break point says : Unhandled Error: ...is not a function

    Hello,
    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:
    Code:
      
    $(window).load(function () {
    var tabA = $$('.nn_tabs_nav ul li:nth-child(2) span a');                                                                     //here I obtain the tab element
    //Functional
            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

  2. #2
    Join Date
    May 2013
    Posts
    2
    I have tried also:
    door.addEventListener("mousedown",function(){tabA.addEvent(click)});
    but in that case I get message:
    Unhandled Error: Undefined variable: click

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles