0

How can I add a dropdown as a child node for jquery dynatree? I have tried it, But it's not working. However adding a text field as node works fine.

1 Answer 1

2

It will add dropdown after the DOM is ready

<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
    $(document).ready(function(){
     $("#dropdown").append("<option>Option 1</option><option>Option 2</option>");

    })
</script>
<body>
    <select id="dropdown"></select>
</body>

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.