Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try this kogil state #3

Open
pavankog opened this issue May 14, 2021 · 5 comments
Open

Try this kogil state #3

pavankog opened this issue May 14, 2021 · 5 comments

Comments

@pavankog
Copy link
Owner

pavankog commented May 14, 2021

Where is css

@pavankog
Copy link
Owner Author

pavankog commented May 14, 2021

okay

@pavankog
Copy link
Owner Author

pavankog commented May 17, 2021

fix this bug asap

@pavankog
Copy link
Owner Author

pavankog commented May 21, 2021

<script>

    $(document).ready(function () {
        document.body.innerHTML= document.body.innerHTML + " <div id='first'>"
        var select = document.createElement('select');
        select.id = 'ddlColor'
        var myOptions = {
            val1: 'text1',
            val2: 'text2'
        };

        document.getElementById('first').appendChild(select);
        $.each(myOptions, function (val, text) {
            $('#ddlColor').append(new Option(text, val));
        });
        //Tooltip for all dropdowns
        $("select").each(function () {
            var i = 0;
            var sel = this;
            for (i = 0; i < sel.length; i++) {
                sel.options[i].title = sel.options[i].text;
            }
        });

        $("#ddlColor").change(function () {
            //Remove existing entries from dropdown
            $('#ddlExample').empty();
            var n = $(this).val();

            var opt = $('<option></option>');
            switch (n) {

                case 'green':
                    opt.val('Mango').html('Mango');
                    opt.attr('title', 'Mango');
                    opt.attr("title", "Mango");
                    break;

                case 'red':
                    opt.val('Mango').html('Apple');
                    opt.attr('title', 'Apple');
                    opt.attr("title", "Apple");
                    break;

                case 'blue':
                    opt.val('Mango').html('Blueberry');
                    opt.attr('title', 'Blueberry');
                    opt.attr("title", "Blueberry");
                    break;

            }
            $('#ddlExample').append(opt);

        });

    });
</script>

@pavankog
Copy link
Owner Author

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>


</head>

<body>
    
</body>
<script>

    $(document).ready(function () {
        document.body.innerHTML= document.body.innerHTML + " <div id='first'>"
        var select = document.createElement('select');
        select.id = 'ddlColor'
        var myOptions = {
            val1: 'text1',
            val2: 'text2'
        };

        document.getElementById('first').appendChild(select);
        $.each(myOptions, function (val, text) {
            $('#ddlColor').append(new Option(text, val));
        });
        //Tooltip for all dropdowns
        $("select").each(function () {
            var i = 0;
            var sel = this;
            for (i = 0; i < sel.length; i++) {
                sel.options[i].title = sel.options[i].text;
            }
        });

        $("#ddlColor").change(function () {
            //Remove existing entries from dropdown
            $('#ddlExample').empty();
            var n = $(this).val();

            var opt = $('<option></option>');
            switch (n) {

                case 'green':
                    opt.val('Mango').html('Mango');
                    opt.attr('title', 'Mango');
                    opt.attr("title", "Mango");
                    break;

                case 'red':
                    opt.val('Mango').html('Apple');
                    opt.attr('title', 'Apple');
                    opt.attr("title", "Apple");
                    break;

                case 'blue':
                    opt.val('Mango').html('Blueberry');
                    opt.attr('title', 'Blueberry');
                    opt.attr("title", "Blueberry");
                    break;

            }
            $('#ddlExample').append(opt);

        });

    });
</script>

</html>

@pavankog
Copy link
Owner Author

pavankog commented Jun 2, 2021

hi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant