Post Reply 
Author [OPEN]Unable to get nextsibling
hussain
Member

Find all posts by this user
Quote this message in a reply
Default  4 June 2013 11:37
I am trying to nextSibling for the element here is my code
        //this function will call on click of some element
        myFunction: function(evt){
            var element = evt.target;
            var sibling = aria.utils.Dom.getNextSiblingElement(element); //getting sibling as undefined
            //want to do some more stuff with sibling
        }
When I tried using core javascript I am able to get the nextsibling
        myFunction: function(evt){
            var element = evt.target;
            var eem = document.getElementById(this.$getId('testme')); //testme is ID of target element
            var sb = eem.nextSibling; //getting newline as textnode so getting next sibling to it
            if(sb) sb = sb.nextSibling;
        }

My observation as of this code is that evt.target which I am getting is AT DOM Object and while nextSibling is expecting Js Object.

Could you please look into this and get it solve
(This post was last modified: 28 November 2013 07:16 by susanta.behera.)
Post Reply