Firebug has built-in command line API and one of the built-in
functions is $
see: http://getfirebug.com/wiki/index.php/Command_Line_API#.24.28id.29

The function expect element ID e.g: $('nav')

If you include jQuery in your page, the $ function from jQuery is used
instead.
But jQuery expects a CSS selector e.g.: $('#nav')

In your case, jQuery is probably not included so, you need to use $
('nav')
or make sure to properly include it.

Honza




On Apr 2, 9:52 pm, PremAnand Lakshmanan <[email protected]> wrote:
> HI
>
> I have written a Django code and testing it with Firebug..I mean im trying
> to play with the ids created but for some reason..
>
> I have this id-nav in my .html file..but this code is always giving error,
>
> $('#nav').hide()
>
> *Error:*
>
> TypeError: $("#nav") is null
>
> *HTML Code:*
>
> <html>
> <head>
>     <title>
>         Django Bookmarks | {% block title %} {% endblock %}
>     </title>
>     <link rel=stylesheet" href="/site_media/style.css"
>         type="text/css" />
>
>     <script type="text/javascript"
>         src="/site_media/jquery.js"></script>
>         {% block external %} {% endblock %}
> </head>
> <body>
>     <div id="nav">
>     <a href ="/">home</a> |
>     {% if user.is_authenticated %}
>         <a href="/save/">submit</a> |
>         <a href="/user/{{ user.username }}/">
>             {{ user.username }}</a> |
>         (<a href="/logout">logout</a>)
>     {% else %}
>         <a href="/login/">login</a>
>         <a href="/register/">register</a>
>     {% endif %}
>     </div>
>     <h1>{% block head %}{% endblock %}</h1>
>     {% block content %}{% endblock %}
>
> </body>
> </html>
>
> --
> Prem
> 408-393-2545

-- 
You received this message because you are subscribed to the Google
Groups "Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
https://groups.google.com/forum/#!forum/firebug

Reply via email to