Click here to Skip to main content
11,713,845 members (91,478 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: jQuery
I am getting error in Jquery as 'null' or not an object.
I have declared the div tag values in jquery. but, still it is getting null object.
see my code below.
Master Page
<html xmlns="">
<head runat="server">
    <link type="text/css" rel="Stylesheet" href="Styles/Home.css" />
    <asp:ContentPlaceHolder ID="paneContentPlace" runat="server">


<asp:Content ID="Content3" ContentPlaceHolderID="paneContentPlace" runat="Server">
        <script language="javascript" type="text/javascript">
            $(document).ready(function () {
                $("div.ContainerPanel").toggle(   /*********** Error Place ('null' or not null object)******/
                function () {
                    $(this).attr("class", "ArrowClose");
                alert("Hello Word");
        <style type="text/css">
 border-style:double double double double;
    width: 400px;
    height: 30px;
    background-image: url('../images/bg-menu-main.png');
    background-repeat: repeat-x;
    color: #FFF;
    font-weight: bold;
    background-image: url('../images/expand_blue.jpg');
    width: 13px;
    height: 13px;
    float: right;
    margin-top: 7px;
    margin-right: 5px;
    background-image: url('../images/collapse_blue.jpg');
    width: 13px;
    height: 13px;
    float: right;
    margin-top: 7px;
    margin-right: 5px;
  <asp:UpdatePanel ID="upnl1" runat="server">
                <div id="ContainerPanel" class="ContainerPanel">
                    <div id="header" class="collapsePanelHeader">
                        <div id="dvHeaderText" class="HeaderContent">
                            jQuery Collapsible Panel1</div>
                        <div id="dvArrow" class="ArrowExpand">
                    <div id="dvContent" class="Content" style="display: none">
                        In Album List Page, we will display 3 albums in a row in Tiled format i.e. to repeat
                        In our case, it is LastItem.
                <br />
                <div id="Div1" class="ContainerPanel">
                    <div id="Div2" class="collapsePanelHeader">
                        <div id="Div11" class="HeaderContent">
                            jQuery Collapsible Panel2</div>
                        <div id="Div3" class="ArrowExpand">
                    <div class="Content" style="display: none">
Posted 22-Mar-13 0:15am
Edited 22-Mar-13 0:23am
Shubhashish_Mandal at 22-Mar-13 7:59am
In which explorer you have got this error?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 330
1 CHill60 315
2 OriginalGriff 165
3 Andy Lanng 138
4 KarstenK 110
0 Sergey Alexandrovich Kryukov 365
1 CHill60 335
2 OriginalGriff 245
3 Andy Lanng 173
4 Richard MacCutchan 150

Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 22 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100