Great plugin by the way.

It might be nice to have an "autohide" type behavior after x seconds on that
Content menu. 

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of DaveG
Sent: Monday, April 16, 2007 11:49 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Updated plugin: jqTOC -- table of contents




> Very nice work.  And kudos on a nice, working demo.  I always 
> appreciate when I can see something cool in action and immediately 
> start thinking about where I could put it to use.
Thanks -- glad it's readable. 

> Suggestions:  (I know it is trivial to hack the script manually, but 
> ...) Add a parameter to close the content window when a heading is 
> selected.  It wasn't immediately obvious to me how to close the window 
> after I had made my selection -- or why the window was still around to 
> begin with.
Added a parameter tocAutoClose, which defaults on. This will close the TOC
when clicking a link.


Currently I have the click() events handled by anonymous functions, like:
   $('#toc_content a').click(function(){
      $('#toc_content').hide();
   });

I'd like to use a local function instead, as I'll be providing similar
functionality for other click events. I tried defining a local function, and
calling like:
   $('#toc_content a').click(my_func(param1));

That did not work, and I didn't see an example in the API docs. How to call
a local function with a parameter from the click() function?

Also, what is the 'correct' way to declare a local function? Simply declare
it inline within the parent function, or is there a more jQuery'esque way?

 ~ ~ Dave


Reply via email to