title: Passing parameters to jQuery function via link
body: <p>I have a jQuery function:</p>
  
  <pre><code>$(function(){ 
  function InitDialog(c,b){
      /* some code */     
  }
  
  $('a[name=dialog]').click(function(e)                                                 {         
              InitDialog(caption, bodyText);        
      fadeInCommon(e,this);
  });
  });
  </code></pre>
  
  <p>And also I have a link defined in html code like below:</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt;&lt;a href="#dialog" name="someInformation" }"&gt;something&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>My question is how can I pass the parameters (caption, bodyText) to Init() function via link?
  I've heard about some method like below:</p>
  
  <pre><code>&lt;li&gt;&lt;a href="#dialog" name="someInformation" onClick="return {height: 100, width:200};"}"&gt;something&lt;/a&gt;&lt;/li&gt; 
  </code></pre>
  
  <p>But I don't understand how can I get and parse it?
  Thanks</p>