title: dynamically change function name in javascript
body: <pre><code>$('a').live('click',function(e){
      e.preventDefault();
      var id = $(this).attr('id');
      infowindow2.open(map, marker2); // I need instead of 2 to print the value of variable id
  });
  </code></pre>
  
  <p>How can I dynamically change the number 2 to variable ID ?</p>
  
  <p>Thanks for any help</p>