title: Retrieving data with jQuery from .php file
body: <p>I'm playing with some scripts, here is what I have:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Home page&lt;/title&gt;
      &lt;link rel="shortcut icon" href="/images/favicon.ico" /&gt;
      &lt;link rel="icon" href="/images/favicon.ico" type="image/x-icon" /&gt;
              &lt;link rel="stylesheet" href="/css/base.css" type="text/css" media="all" /&gt;
              &lt;link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/base/jquery-ui.css" type="text/css" media="all" /&gt;
              &lt;link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" /&gt;
              &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
              &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt;
              &lt;script src="http://jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.2.js" type="text/javascript"&gt;&lt;/script&gt;
              &lt;script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/minified/i18n/jquery-ui-i18n.min.js" type="text/javascript"&gt;&lt;/script&gt;
  
  
      &lt;script type="text/javascript"&gt;
          function get() {
              $.post('data.php',
                  function(output) {
                      $('#container').html(output).show();
              });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;script&gt;
      $(function() {
          $( "#tabs" ).tabs();
      });
      &lt;/script&gt;
  &lt;div class="demo"&gt;
  
  &lt;div id="tabs"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="#tabs-1"&gt;Статии&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#tabs-2"&gt;Коментари&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#tabs-3"&gt;Европа&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#tabs-4"&gt;Свят&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;div id="tabs-1"&gt;
          &lt;a id="BB" onClick="get();"&gt;Тайният проект Бойко Борисов&lt;/a&gt;
  
      &lt;/div&gt;
      &lt;div id="tabs-2"&gt;
          &lt;p&gt;Защо се изкупува земя от северозападна България&lt;/p&gt;
      &lt;/div&gt;
      &lt;div id="tabs-3"&gt;
          &lt;p&gt;Бъдещето на Гърция&lt;/p&gt;
      &lt;/div&gt;
      &lt;div id="tabs-4"&gt;
          &lt;p&gt;Мястото на САЩ е политиката на ЕС&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="container"&gt;
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Later on I want to use the <code>data.php</code> file to connect to the database and extract data from there, but for now I just want to make it work for any data stored in <code>data.php</code>.</p>
  
  <p>I use this script, where I think is the main problem:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;             
      function get() {
          $.post('data.php',              
          function(output) {                          
              $('#container').html(output).show();                    
      });        
  &lt;/script&gt;
  </code></pre>
  
  <p>and I want to place the data in <code>&lt;div id="container&gt;&lt;/div&gt;</code></p>
  
  <p>The final idea is to load the links from the menu in the container <code>div</code>, which I try to do like this:</p>
  
  <pre><code>&lt;div id="tabs-1"&gt;
      &lt;a id="BB" onClick="get();"&gt;Тайният проект Бойко Борисов&lt;/a&gt;
  </code></pre>
  
  <p>In <code>data.php</code> I have just an <code>echo "Hello world";</code> but nothing shows up when I click the link. I guess there is more than 1 problem but any help is appreciated.</p>
  
  <p>Thanks, Leron.</p>