title: How to substitute facebook like button's href attribute with a link from json object
body: <p>On my page I have main div, which is generated by a plugin from a link. I'm getting this link by ajax call to simple json object. I need to substitute this link into the href attribute of mine XFBML FB Like button.</p>
  
  <p>Here, what I've tried:</p>
  
  <pre><code>//application.js
   $.getJSON('/full/path/show.json?' function(data) {
                  $('#maindiv').somePlugin(data.data_link);
                 //some actions
      $('#facebook').attr('href', data.data_link);
              });
  
  //index.html
  &lt;div id ='facebook'&gt;
  &lt;fb:like href="" layout="button_count" show_faces="false" width="450" colorscheme="dark"&gt;&lt;/fb:like&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>But it doesn't upgrade the href attribute and just leaves my page's link by default. What am I doing wrong? </p>