Registering a Named Function as a Listener with Jquery

Posted by Marcus on Stack Overflow See other posts from Stack Overflow or by Marcus
Published on 2010-03-27T23:13:28Z Indexed on 2010/03/27 23:23 UTC
Read the original article Hit count: 326

Filed under:
|
|
|
|

I'm new to javascript/jquery and I've done some poking around the web, but I can't figure out why the following is invalid:

var toggleSection = function(sectionName) {
// Do some Jquery work to toggle stuff based on sectionName string
// (concatenate sectionName with other text to form selectors)
};
$('#togglecont1').click(toggleSection("container1"));

Is there something obvious I'm missing? Thanks in advance.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about named

  • How to allow bind in app armor?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    Question: I did setup bind9 as described here: http://ubuntuforums.org/showthread.php?p=12149576#post12149576 Now I have a little problem with apparmor: If I switch it off, it works. If apparmor runs, it doesn't work, and I get the following dmesg output: [ 23.809767] type=1400 audit(1344097913… >>> More

  • MAMP + Python MySQLDB - trouble installing

    as seen on Server Fault - Search for 'Server Fault'
    I'm currently running the latest version of MAMP on my Snow Leopard OSX, and I'm trying to install MySQLDB. Downloaded: MySQL-python-1.2.3c1 I went into the setup_posix.py and adjusted the location of the mysql_config to the one in MAMP: mysql_config.path = "/Applications/MAMP/Library/bin/mysql_config" When… >>> More

  • Building Awesome WM

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. After running cd awesome-3.4 && make I get the following missing dependencies error: Running… >>> More

  • Building Awesome WM

    as seen on Server Fault - Search for 'Server Fault'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. EDIT I ran: sudo apt-get install libxcb-xtest0-dev libxcb-property1-dev libxdg-basedir-dev libstartup-notification0-dev… >>> More

  • Building Awesome WM

    as seen on Super User - Search for 'Super User'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. EDIT I ran: sudo apt-get install libxcb-xtest0-dev libxcb-property1-dev libxdg-basedir-dev libstartup-notification0-dev… >>> More