Aria Templates Forums
[OPEN]Unable to get nextsibling - Printable Version

+- Aria Templates Forums (http://ariatemplates.com/forum)
+-- Forum: Public forums (/forumdisplay.php?fid=3)
+--- Forum: Support (/forumdisplay.php?fid=8)
+--- Thread: [OPEN]Unable to get nextsibling (/showthread.php?tid=24)



[OPEN]Unable to get nextsibling - hussain - 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