jQuery UI Widgets Forums Editors CheckBox, RadioButton The dynamic addition of div?

This topic contains 2 replies, has 2 voices, and was last updated by  admin 8 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • The dynamic addition of div? #82102

    my_2000
    Participant
    for (var i = 0; i < 10; i++) {
       var temp = i;
       var oTr = oTable.insertRow(-1);
       var oTd = oTr.insertCell(-1);
       var oDiv = document.createElement('div');
       oTd.appendChild(oDiv);
       if(i%2==0){
        oDiv.jqxCheckBox({width:25,groupName:"2"});
       }else{
        oDiv.jqxCheckBox({width:25,groupName:"1"});
       }
       oTd.innerHTML+= temp;
    }

    Please tell me how to write?

    The dynamic addition of div? #82132

    my_2000
    Participant
    for (var i = 0; i < 10; i++) {
       var temp = i;
       var oTr = oTable.insertRow(-1);
       var oTd = oTr.insertCell(-1);
       var oDiv = document.createElement('div');
       oTd.appendChild(oDiv);
       if(i%2==0){
        $(oDiv).jqxCheckBox({width:25,groupName:"2"});
       }else{
        $(oDiv).jqxCheckBox({width:25,groupName:"1"});
       }
       oTd.innerHTML+= temp;
    }

    cann’t click! Please tell me how to write?

    The dynamic addition of div? #82168

    admin
    Keymaster

    Hi my_2000,

    Remove oTd.innerHTML+= temp; and you will be probably able to. With such code, you replace everything with plain html.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.