placeHolder with jQuery

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script language="javascript" type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript">
        $(function () {
            $('input:checkbox[id$=chckBox]').click(function () {
                if (this.checked) {
                    $('div[id$=plcHl]').show('slow');
                }
                else {
                    $('div[id$=plcHl]').hide('slow');
                }
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:CheckBox ID="chckBox" runat="server" Text="Some text" />
    <br />
    <asp:Panel ID="plcHl" runat="server">
        <br />
        <table>
            <tr>
                <td>
                    Free Wi-Fi to entire world
                </td>
            </tr>
        </table>
    </asp:Panel>
    </form>
</body>
</html>

0 comments:

Post a Comment