jquery funtion fired when dropdownlist selectedvalue

Posted by Rahat Saini on Stack Overflow See other posts from Stack Overflow or by Rahat Saini
Published on 2012-11-06T04:32:30Z Indexed on 2012/11/06 5:00 UTC
Read the original article Hit count: 244

i have a jquery animate function which i want to call if the selectedvalue for my dropdown list is X

       <script>
    $(function () {
        var state = true;
        ($("#button").click)(function () {
            if (state) {
                $("#effect").animate({
                    backgroundColor: "#aa0000",
                    color: "#fff",
                    width: 500
                }, 1000);
                  } else {
                $("#effect").animate({
                    backgroundColor: "#fff",
                    color: "#000",
                    width:500

                }, 1000);
            }
            state = !state;
        });
    });

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about ASP.NET