dstreet / dependsOn

a jQuery plugin for handling form field dependencies
http://dstreet.github.com/dependsOn
MIT License
106 stars 32 forks source link

First animation problem #31

Closed decadence closed 8 years ago

decadence commented 8 years ago

Version 1.3.1. I face small issue when subject is activated / deactivated first time and show / hide animation is not working. jQuery shows / hides element instantly. Animation works only on the next actions.

dstreet commented 8 years ago

Can you use http://requirebin.com/ and post a code example that reproduces this issue?

decadence commented 8 years ago

It reproduces by very basic example.

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>

    <script src="./jquery-3.1.1.min.js"></script>
    <script src="./dependsOn.min.js"></script>

    <script>
        $(function () {           

            $("#text").dependsOn({
                "#first": {
                    checked: true,
                }
            });
        });
    </script>
</head>
<body>

<input type="checkbox" id="first"> 1

<input id="text" type="text" value="text" />

</body>
</html>
decadence commented 8 years ago

@dstreet Thanks!