开发者

ExtJS equivalent of jQuery's $(".className", parent)

开发者 https://www.devze.com 2023-03-25 21:41 出处:网络
I have the JavaScript code, where ContentSection is a div which contains the ContentLeft and ContentRight div-

I have the JavaScript code, where ContentSection is a div which contains the ContentLeft and ContentRight div-

    var containerDivs = $(".ContentSection");
    for (var i = 0; i < containerDivs.length; i++) {
        var containerDiv = containerDivs[i];
        //Select right and left div's from the container div
        var leftDiv = $(".ContentLeft", containerDiv)[0];
        var rightDiv = $(".Conten开发者_如何学GotRight", containerDiv)[0];

        if (leftDiv.clientHeight > rightDiv.clientHeight) {
            rightDiv.style.height = leftDiv.clientHeight;
        }
    }

I am trying to move from jQuery to ExtJS but I am not sure what the ExtJS equivalent of $(".cpfContentLeftWrapper", containerDiv)[0] is.


ExtJS analog:

Ext.query(".cpfContentLeftWrapper", containerDiv)[0]
0

精彩评论

暂无评论...
验证码 换一张
取 消