Posted By

kayue on 12/30/08


Tagged

jquery


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

mkmanning
Alexw


Call function conditionally in one line


 / Published in: JavaScript
 

URL: http://blog.darkthread.net/blogs/darkthreadtw/archive/2008/12/16/call-diff-func-conditionally.aspx

  1. $("#someDiv")[someCondition ? "show" : "hide"]();

Report this snippet  

You need to login to post a comment.