Wednesday, December 5, 2012

Jquery Toggle with id, class and paragraph


Toggle the elements with id "divtoggle"

Toggle the elements with class "test"

Toggle the elements with "p"

<html xmlns="">
<head runat="server">
<script src="jquery-1.8.3.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#btnClick').click(function () {

    <form id="form1" runat="server">
    <input type="button" id="btnClick" value="+" />
     <h2 class="test">This is a heading</h2>
    <div id="divtoggle">
    I am a Toggle panel
    <p>I am a paragraph</p>

No comments:
Write comments
Recommended Posts × +